AppDelegate:
`self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
Override point for customization after application launch.
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
self.secondView = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;`
第一个viewcontroller:
` SecondViewController *second=[[SecondViewController alloc] init];
second.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;
[self presentViewController:second animated:YES completion:^{}];`
第二个: [self dismissViewControllerAnimated:YES completion:^{}];
出现的错误: Thread 1:Program received signal : "SIGABRT"
xib文件我都有连线
看到上面的问题和众位的回答,我算是抛砖引玉吧,对于你这样的初级学习者可以从官方的例子入手,例子下载地址:xcode--help--documentation and API Reference--在搜索框输入uicatalog 然后就可以看到例子了,然后点击open project 然后xcode会自动下载程序,下载后会自动打开,另外这个例子包含基本的控件的使用,有oc何swift两个版本,希望对你有用
![Uploading screenshot . . .]()
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。