iphone

iPhone COUNT going up in increments of 3

I've managed to get my app to count the number of actions on an IBAction button, and then perform a different task once the number of clicks exceeds 10. Unfortunately, the Count seems to be increasing by 3 at a time, instead of 1. Any ideas what I've done wrong here? - (IBAction) do_button_press:(id)sender { static int count = 0; ...

Core Data NSFetchedResultsController - Total number of records returned

Hello, I'm using an NSFetchedResultsController in an iPhone app, and am wondering if there is some easy way of getting the total number of rows returned in all sections. Instead of getting the [[fetchedResultsController sections] count] and then looping through each section to get its count, can it be done in one line? Thanks! ...

How to create a full-screen modal status display on iPhone?

I'm trying to create a modal status indicator display for an iPhone app, and would like one similar to this one used in Tweetie: Specifically, this one "shades out" the entire screen, including the toolbar. I don't believe through any normal UIView manipulation, I can extend past the bounds of my window, can I? I believe I've seen a s...

iPhone SDK - how can I tell when an animation has finished?

I am starting an animated enlargement when an image is touched, and then scaling it back down to normal size when it is released. By using setAnimationBeginsFromCurrentState:YES the zooming effect is nice and smooth if you lift your finger part way through animating. However, what I want to do is "lock" the larger size in place if you'...

Help getting NSURLConnection progress

The app is downloading a file (plist) which is generated by the server. The server takes a loooong time to generate the file, so I would like to be able to show progress (probably view UIProgressView, but that's not important). Since the file I'm downloading hasn't been created yet at the beginning of the request, we don't know the expe...

Need advice about how to cache text data on iPhone

Could you give me some algorithm or example? ...

Plist not saving from dictionary (to Documents)

I've been trying to save a plist of a NSDictionary to my app's Documents folder. I haven't tried this on the device yet but I'd like it to work on the simulator for testing purposes. The [self createDictionaryFromChoreList] method just creates a NSDictionary from some data in another class of mine. I've pretty much copied/pasted this cod...

iPhone: Core Location to keep asking for user permission

Hi.. I have an app that ask for user's Location. Then user's location will be send to a server. Since the app that was run on first time on a iPhone will ask for permission, if a user rejects it, the app will keep on asking it on next time until it was allowed (AFAIK); but if the user allows the app to use the location twice, the app wi...

iPhone ivar naming convention

Hi all, I've noticed that in a lot of the reference materials out there, I see that a lot of the time, variables are named _variable in the .h file, then are @synthesize'd in the .m file as @synthesize variable = _variable; Why is this done? What am I missing? Thanks! ...

creating a free version of an app, but having the app separate on debug device.

Hi, I was just making a free version of one of my apps. I copied the folder, renamed the project, and changed the icon file, loading screen, interface, and code. BUT YET it still replaces a build on my phone. 1)how do I stop this from happening (i want both the free and paid version on my phone) 2) if you can fix this, will a custom...

Embedding an offline Dashcode application in a UIWebView in an iPhone application

In order words, can anyone tell me the basics of how to create a "hybrid" iPhone application? I want to load the web content (the Dashcode app itself) from the native application's application bundle. I've gotten this to partially work, but some content won't display and it otherwise seems like Dashcode is assuming a certain Safari envi...

Object life after death (retain count = 0)

I just noticed this in some code that's been working for months. Though it makes me curious I'm sure we've been living on borrowed time... Assuming activeItem: @property (nonatomic, retain) ItemView *activeItem; And we have this conditional in touchesEnded: if (CGRectContainsPoint(dropRect, touchLocation)) { ItemView *replacemen...

Pausing Game when someone calls/SMS you.

I want to implement this function on my apps but i cant seem to figure out how to use this line of codes. - (void)applicationWillResignActive:(UIApplication *)application { //our app is going to loose focus since there is an incoming call [self pauseGame]; } - (void)applicationDidBecomeActive:(UIApplication *)application{ //the user...

iPod Touch to iPod Touch Messaging using Push Notification Service

Can I use the push notification to send the message from one iPod touch to another one? Is there any pointer information that I can read? Thank you! Marcelo ...

Is there anything like viewDidLoad for the loading of the app's main xib?

As in the one defined with "Main nib file base name" in the app's Info.plist. Should I just use applicationDidFinishLaunching? ...

how to add in app purchase in my application

hi I want to use in app purchase application in my application but i have no more knowledge how to do this. any body help me how to do and where is source code is available. give me link or code. ...

How to read Chinese characters?

I have got a text file from the server and it contains Chinese characters. How to read these characters? ...

Sync iCal in Iphone appilication

Hello, Cam we sync iCal in Iphone application? ...

How a get a part of the string from main String in Objective C

Hi friends, I have mainString from which i need to get the part of the string after finding a keyword. NSString *mainString = "Hi how are you GET=dsjghdsghghdsjkghdjkhsg"; now I need to get the string after the keyword "GET=". Waiting for a reply. ...

Posting a jaiku using xcode

NSMutableURLRequest *jaikuRequest=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://api.jaiku.com/json"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; [jaikuRequest setHTTPM...