In an objective C project with GC enabled, I am allocating an array of variable size on the stack like this:
MaValue *myStack = alloca((sizeof(id) * someLength));
(The reason why I want to do this is not important:)
Then, within a loop, I push and pop stuff on/from myStack. Some of the things I push onto the stack are new objects that...
Hello all,
I want to register my app for push notification when my application terminates so i think if i delay my app quitting time it could be possible.Does someone knows how to delay application quitting time? I think this method
[self performSelector:(SEL)aSelector onThread:(NSThread *)thr withObject:(id)arg waitUntilDone:(BOOL)wa...
Hello,
I'm working with a GPS module that is transferring data to my mac over a serial RS232-to-USB interface. I've written a objC program that takes the raw data and converts it into meaningful information.
Using a program called goSerial, I'm able to log all incoming data into a text file. I have been able to make my program read the...
Does anyone know how to create a "text crawl" like that shown at the bottom of the ESPN ScoreCenter app for the iphone?
Basically, there is a small bar of text at the bottom of the screen and the text is animated so that it moves slowly from right to left across the screen.
Can anyone point me to some source code that does something...
I've written an iPhone App that calculates a total cost by adding/subtracting units of predetermined cost. This was working fine until I realised that the float values I was using caused the total to be inaccurate so I started to look into using NSDecimalNumber. I'm now rather confused and have an 'out of scope' error. Relevant sections ...
Hello,
I'm currently writing an iPhone application which gets some data from the user and uploads it to a server. The uploaded data will be displayed to other users of the same program (there's more to it than that, but to keep the idea simple...). The data which is uploaded is basically just three strings: a name(max. 50 char.), a titl...
I was using UIGetScreenImage in my app, however, as everyone knows Apple is rejecting apps using private APIs. I have researched alternate ways to do this with takepicture but you get different size images as well as the annoying snapshot sound. Microsoft tag. Quickmark and Redalaser all use the UIGetScreenImage (it's obvious) but I want...
I'm working on an application, I have a NSMutableArray that stores 20 or so sprites. I need to iterate through it fairly quickly and efficiently. The speed for my purposes is not optimal... I'm getting two values from each sprite as it iterates through, would it be more efficient (faster) to iterate through an array of say CGPoints then ...
I am having problems writing statements, especially when updating.
I want to update a column with a parameter, but I don't know the special characters to use like @ or %d.
I tried to do:
const char *sqlStatement = [[NSString stringWithFormat:
@"update lugar set frecuencia ='d%'aumentador Where idLugar = '%d'",
idLugarParametro] ...
Suppose I have an immutable NSArray and want to create several sub-arrays. I could invoke subarrayWithRange on the original array and get a new NSArray. Does the new copy share memory region with the old copy?
In the worst case I may end up creating a sub-array for each element of the original array (starting with that element and endin...
Hello,
I have two files in the Documents directory of the same image taken with the camera. One was saved using UIImagePNGRepresentation and the the other one using UIImageJPEGRepresentation. In other word, one is a png and the other is a jpg.
Now, using the the instrument with a real device. if I load the png (initWithContentOfFile:),...
I have an array of custom objects. The objects includes a dictionary.
Something like this:
CustomDataModel *dataModel;
dataModel.NSString
dataModel.NSDictionary
dataModel.image
I'd like to sort by one of the objects in the dictionary:
dataModel.NSDictionary ObjectWithkey=@"Name"
The dataModel gets loaded into an NSArray. I now wan...
Hi,
I'm using Matt Gemmell's amazing MGTwitterEngine for an iPhone project, and my lack of familiarity with Obj-C and JSON parsing is making a simple job seem rather daunting.
I've read this link, and while it helps me understand how the data is structured, I still can't seem to be able to parse it.
If I do an NSLog of the output of g...
i want to set different image icon for the each cell of tabelview , i dont know how to do this , pls help me.
...
What are the data structures that we can use in objective c?
...
How to set different icon image for each cell in the UItable View.
...
I want to developed a application in iphone with objective-c that is retrieve all call details That we can show incoming, outgoing and Missed call. can this is possible that we can do this.
...
Hi,
I have code snippet,
which is like this...
#import <sqlite3.h>
@interface DatabaseClass : NSObject {
sqlite3 *database;
}
@property ( nonatomic, retain ) database;//////this//////
@end
In the implementation file;
#import "DatabaseClass.h"
@implementation DatabaseClass
@synthesize database;//////this///////
@end
My...
I am trying to perform a simple operation that i have done alot in this program. I am trying to launch the CLLocationManager once the app is finished launching and get the current location once the update has happened. My app works in that it get the current location, when i NSLog the current location it works fine. The problem is that i...
I am trying to study OpenGL and I have the framework added, but I am getting linker errors. I believe the issue is adding the library to the project for linking and EVERY time I try to add a library, I hunt around for the configuration setting forever. Someone, please give me the simple click-n-go answer!
...