iPhone API notes
iPhone API notes
Subclassing
- NEVER subclass UINavigationControllers or UITabBarControllers.
- Just add whatever ViewController you want via the initWithRootViewController: method.
Turn off the Status Bar
- To turn the Status Bar off for even the 'splash screen', edit the info.plist (maybe prefixed with your app name) and add a row with a key of UIStatusBarHidden and boolean type set to true.
- Adding the following to the Application Delegate's applicationDidFinishLaunching method will also work, but will not hide the status bar during the 'splash screen':
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
Change appearance of the Status Bar
- In the Application Delegate's applicationDidFinishLaunching method add the following:
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];
Get UIWindow
- Useful if you are at the 'top' of the hierarchy.
UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
iPhone Application notes
Screen Dimensions
- 320px wide
- 480px tall
- Status bar: 20 pixels reference
- Nav bar: 44 pixels reference
- Tab bar (bottom): 49 pixels reference
- Toolbar: 44 pixels reference
Application Icon
- Named 'Icon.png' or set CFBundleIconFile key to the correct name.
- 57px x 57px png
- The appstore requires a 512px x 512px version of the icon.
- 72 ppi
- RGB; no layers; no transparency
- JPEG or TIFF file format
- To disable the shine / gloss on the icon:
- open the Info.plist for the app
- add a UIPrerenderedIcon row
- set to boolean type
- set to a value of TRUE.
- Don't forget to 'add' it to the Xcode project, don't just copy it to the folder.
Splash screen
- Named 'Default.png'
- 320px x 480px
- Don't forget to 'add' it to the Xcode project, don't just copy it to the folder.
Tab bar icons
- Gray scale png, with an alpha.
- Approx 30px x 30px