iPhone development tips20 Oct 2009
Tip #1: Loading screen
To get your app looking cool and having a loading image come up as the application is loading simply add a file called "Default.png" size 320Ã¢â‚¬â€ Ãƒâ€”Ã¢â‚¬â€ 480 to your xcode project and it will automatically show up as the application is loading.
Tip #2: Network Activity Icon
So your application connects to the internet and you want to add those little touches to let the user know its connecting. Well the simple option is to show the network activity indicator. To do that its as simple as setting a variable like so
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
Then to hide it its simply
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
Now you can wire it up to be a little more logical in that way it determines if its working or not but ill leave that to you. Keep an eye out as more tips are on the way
Tip #3: Detect if running in iPhone simulator
What to run different code depending if you running in the iPhone simulator or not. Just use the following if statement.
#if TARGET_IPHONE_SIMULATOR // simulator code #else // production code #endif