viewDidAppearの処理がされない
Posted: 2011年2月09日(水) 17:00
/////AppDelegate~.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// タブバー
viewControllers = [[NSMutableArray alloc] initWithCapacity:0];
NSArray *tabBarTitleArray = [NSArray arrayWithObjects:
@"ホーム",
@"お気に入り",
@"更新情報",
nil];
NSArray *imageArray = [NSArray arrayWithObjects:
@"Home.png",
@"Favorite.png",
@"Others.png",
nil];
TopMenuController *tableViewController;
for(int i = 0; i <[tabBarTitleArray count]; i++){
if( i == 0 ) tableViewController = [[TopMenuController alloc] init];
if( i == 1 ) tableViewController = [[FavoriteMenuController alloc] init];
if( i == 2 ) tableViewController = [[UpdataMenuController alloc] init];
tableViewController.title = [tabBarTitleArray objectAtIndex:i];
navigationController = [[UINavigationController alloc] initWithRootViewController:tableViewController];
navigationController.tabBarItem.title = [tabBarTitleArray objectAtIndex:i];
navigationController.tabBarItem.image = [UIImage imageNamed:[imageArray objectAtIndex:i]];
[viewControllers addObject:navigationController];
}
tabBarController = [[UITabBarController alloc] init];
tabBarController.moreNavigationController.navigationBar.barStyle = UIBarStyleBlack;
tabBarController.customizableViewControllers = NO;
[tabBarController setViewControllers:viewControllers];
// tabBarController.view.frame = CGRectMake( 0, 20, 320, 480-20-48 );
[window addSubview:tabBarController.view];
[window makeKeyAndVisible];
return YES;
}
/////FavoriteMenu~.m
- (void)viewDidAppear:(BOOL)animated {
[self.tableView reloadData];
[super viewDidAppear:animated];
}