0
在以前的應用中我已經通過重寫的init定製我的tabBarItems(見下文)在控制器中自定義UITabBarItems?
- (id)init {
self = [super init];
if(self) {
UITabBarItem *tabBarItem = [self tabBarItem];
[tabBarItem setTitle:@"ONE"];
}
return self;
}
看Xcode的模板現在我想,我會更好,這個定製添加到initWithNibName後:包:不是。
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
UITabBarItem *tabBarItem = [self tabBarItem];
[tabBarItem setTitle:@"ONE"];
}
return self;
}
這是否有意義,它似乎對我有用,但我只是想檢查?
加里
那是我在想什麼,非常感謝,我只是想得到第二個意見,以確保我在正確的軌道上。 – fuzzygoat 2010-09-06 11:48:03