Thursday, September 30, 2010

How to Create Default.png

Every released application must have a Default.png file, which is presented during startup. It is supposed to present the default startup view - but empty.


Since all applications are unique (even the thousands of fart apps), there is no single way to create a default.png. However here's two tips, which I use:

1) If your startup view contains a list, create empty list by defining number of sections as 0 (zero):
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    // For Default.png creation
    return 0;
}
2) If your application has UITabBar, clear tab titles:
- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    // For Default.png creation
    for (UITabBarItem *item in self.parentViewController.tabBarController.tabBar.items)
        item.title = @"";
}
In general Default.png should not contain any text strings, since one day you might translate your application to other languages. That day you don't want to flash different language strings during app launch.


...oh, and how to create the actual file? Fix your app to present an "empty screen", build and launch debug version in your handset and take a screenshot in your real device by pressing "Power Button" at top and "The Other Button" at front at the same time. Finally open iPhoto in Mac OSX machine and transfer the pic from iPhone...

No comments:

Post a Comment