When you design, you're dreaming what could happen. When you code, you're experimenting what can happen. When you debug, you're learning what is happening.
Showing posts with label viewWillAppear. Show all posts
Showing posts with label viewWillAppear. Show all posts
Wednesday, May 18, 2011
Some retainCount Love
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):
...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...
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 *)tableView2) If your application has UITabBar, clear tab titles:
{
// For Default.png creation
return 0;
}
- (void)viewWillAppear:(BOOL)animatedIn 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.
{
[super viewWillAppear:animated];
// For Default.png creation
for (UITabBarItem *item in self.parentViewController.tabBarController.tabBar.items)
item.title = @"";
}
...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...
Labels:
Default.png,
distribution,
numberOfSectionsInTableView,
screenshot,
UITabBar,
UITabBarController,
UITabBarItem,
UITableView,
viewWillAppear
Tuesday, February 16, 2010
Why viewWillAppear Wasn't Called?
Have several views defined as XIB, work just fine as standalone views and as main views under UITabBar. However they stopped working when added them as subviews under main view in UITabBar (don't ask...)
The problem was that viewWillAppear wasn't called automatically, because I added the views manually under another view. Apple documentation suggests calling the missing function manually - and yet again everything works just fine!
The problem was that viewWillAppear wasn't called automatically, because I added the views manually under another view. Apple documentation suggests calling the missing function manually - and yet again everything works just fine!
self.myController =
[[MyViewController alloc]
initWithNibName:@"MyViewController" bundle:nil];
[self.mainView addSubview:myController.view];
[self.myController viewWillAppear:YES];
Labels:
interface builder,
iphone,
UITabBar,
viewWillAppear,
XIB
Subscribe to:
Posts (Atom)