J'ai ajouté tabbarcontroller, setViewControllers utilisé pour fournir le tableau de uiviewcontroller. viewDidLoad est appelée pour viewContollers mais pas viewDidAppear ni viewWillAppear. le code que je l'ai écritviewDidAppear pas appelé
- (void)loadView {
printf("*********\n loadView \n********* ");
UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
contentView.backgroundColor = [UIColor whiteColor];
self.view = contentView;
[contentView release];
UITabBarController *tabbar = [[UITabBarController alloc] init];
tabbar.view.frame = CGRectMake(0, 0, 320, 460);
piechartViewController *pr=[[piechartViewController alloc]init];
pr.tagInAction=1;
[email protected]"Type";
pr.tabBarItem.image=[UIImage imageNamed:@"trend.png"];
pr.sDate=sDate;
pr.nDate=nDate;
piechartViewController *pr1=[[piechartViewController alloc]init];
[email protected]"category";
pr1.tagInAction=4;
pr1.sDate=sDate;
pr1.nDate=nDate;
piechartViewController *pr2=[[piechartViewController alloc]init];
[email protected]"paidWith";
pr2.tagInAction=3;
pr2.sDate=sDate;
pr2.nDate=nDate;
[tabbar setViewControllers:[NSArray arrayWithObjects:pr,pr1,pr2,nil]];
[self.view addSubview:tabbar.view ];
[pr release];
[pr1 release];
[pr2 release];
}