IOS 6更新代码错误切换视图

问题描述:

IM设计的应用程序那是一个单一视图的应用程序和我加入的代码,这样我可以切换通过一个按钮,但每一次我进入我的代码观点,即在IOS 5它的工作现在出现错误?继承人的代码IOS 6更新代码错误切换视图

#import <UIKit/UIKit.h> 


@interface ViewController1 : UIViewController 


- (IBAction)home:(id)sender; 


@end 




#import "ViewController1.h" 

#import "ViewController.h" 

@interface ViewController1() 

@end 

@implementation ViewController1 


- (IBAction)home:(id)sender 
{ 
    ViewController *second =[[ViewController alloc] initWithNibName:nil bundle:nil]; 
    [self presentModalViewController:second animated:YES]; 
} 

继承人的错误

enter image description here

谢谢! 编辑回答我的错误现在? enter image description here

enter image description here

enter image description here

的方式我真的很感激它,我会给你你的答案好剔做一次,这是错误的,现在?

enter image description hereenter image description here

+0

请帮忙??? – Picm

首先,这不是一个错误,但它是警告。

而寻求帮助,你可以阅读苹果公司提供的文件。

,并删除该警告只使用下面的代码

[self presentViewController:second animated:YES completion:^{ }]; 
+0

你确定这是正确的,因为它出现更多的错误? – Picm

+0

我累了它在我和Xcode 4.5项目,它工作正常 –

+0

顺便说一句显示什么错误,请他们解释或编辑你的问题:) –