Graphics Programs Reference
In-Depth Information
Let's start by putting titles on our tab bar items. Open
HypnosisViewControl-
ler.m
. Override
UIViewController
's designated initializer,
initWithNibName:bundle:
, to get and set a tab bar item for
Hyp-
nosisViewController
.
- (id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)bundle
{
// Call the superclass's designated initializer
self = [super initWithNibName:nil
bundle:nil];
if (self) {
// Get the tab bar item
UITabBarItem *tbi = [self tabBarItem];
// Give it a label
[tbi setTitle:@"Hypnosis"];
}
return self;
}
Then open
TimeViewController.m
and do the same thing.