2011-11-08 31 views
0

請查看代碼我不能夠顯示所有使用presentModalViewController另一個控制器:

-(IBAction)startGame{ 
NSLog(@"Button is pressed"); 

CharadesAppDelegate *del=(CharadesAppDelegate*)[[UIApplication sharedApplication]delegate]; 
[del setAllTeams:teamDict]; 
[del setScore:selectedScroll]; 
Playing *p=[[Playing alloc]init]; 
    [self presentModalViewController:p animated:YES]; 

} 

,我要提供播放控制器,它僅包含以下行

- (void)viewDidLoad { 
[super viewDidLoad]; 
self.view.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg.png"]]; 

} 但遺憾的是我不能切換到另一個控制器沒有任何反應,當我按下按鈕時,請幫助

回答

0

如果您使用的筆尖文件的UIViewController,你應該使用不同的-init

Playing *playingVC = [[Playing alloc] initWithNibName:@"Playing" bundle:nil]; 

記住更改筆尖名。

相關問題