开发者社区> 问答> 正文

关于IOS view跳转返回时出现错误

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文件我都有连线

展开
收起
爵霸 2016-03-13 11:34:19 1818 0
1 条回答
写回答
取消 提交回答
  • 看到上面的问题和众位的回答,我算是抛砖引玉吧,对于你这样的初级学习者可以从官方的例子入手,例子下载地址:xcode--help--documentation and API Reference--在搜索框输入uicatalog 然后就可以看到例子了,然后点击open project 然后xcode会自动下载程序,下载后会自动打开,另外这个例子包含基本的控件的使用,有oc何swift两个版本,希望对你有用
    ![Uploading screenshot . . .]()

    2019-07-17 19:02:20
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
手淘iOS性能优化探索 立即下载
From Java/Android to Swift iOS 立即下载
深入剖析iOS性能优化 立即下载