`

(转)[IOS]自定义mainstoryboard需要注意的细节

    博客分类:
  • IOS
阅读更多

转自:https://blog.csdn.net/taoerit/article/details/73855018

 

      有时候我们不用main作为主要的mainstoryboard,这个时候就要修改一些配置,否者启动的时候会崩溃,或者启动后界面是黑色的

 

 

1 自定义storyboard的控制器类需要填写
2 ✅is initial view controller,打勾, 也就是view前面的指示箭头
3 info.plist文件中修改:Main storyboard file base name = "usercustom",自定义storyboard名称
4 targets里设置main interface = usercustom
5 appdelegate.swift 里也不用写任何code
6 确认以上5个填写正确基本没有问题了



 

 

参考:https://www.jianshu.com/p/88189c9d31d8

分享到:
评论

相关推荐

    ios版本的helloworld

    4.创建完成后双击文件中的MainStoryboard_iPad.storyboard文件打开设计界面 5.拖个Round Rect Button控件到界面里面 6.修改ViewController.h头文件 加入代码 @interface ViewController : UIViewController { ...

    iOS实现图片轮播器

    2.在mainstoryboard中拖入ScrollView和Page Control(也可以代码写,或者是自定义xib) 设置page control的 Current Page属性,决定轮播的当前页显示的颜色 3.接下来就是正式代码了 //(1)将需要展⽰的内容添加到...

    iOS使用UISearchController的官方例子-DisplayingSearchableContentByUsingASearchController

    官方的这个例子使用swift写的,功能挺全的,新手下载看看代码,5分钟就可以上手了。 AppDelegate.swift MainTableViewController.swift MainTableViewController+DataSource.swift ...MainStoryboard.storyboard

    Gank.lu:适用于iOS的Gank.io客户端

    NavigationController和MainStoryBoard(2016.1.3)的用法自定义UITableViewCell(2016.1.7) 安装CocoaPods并学习使用它,使用Alamofire处理网络请求(2016.1.9) 使用SwiftyJSON解析json数据,使用Kingfisher显示...

    iOS开发之路–仿网易抽屉效果

    MainStoryBoard示意图: BeyondViewController.h // // BeyondViewController.h // 19_抽屉效果_仿网易 // // Created by beyond on 14-8-1. // Copyright (c) 2014年 com.beyond. All rights reserved. // #...

    StoryboardHelper:用于生成有用的访问功能作为 UIStoryboard 扩展的脚本

    class func mainStoryboard () -> UIStoryboard { return UIStoryboard ( name : " Main " , bundle : nil ) } class func anotherStoryboard () -> UIStoryboard { return UIStoryboard ( name : " Another " ...

Global site tag (gtag.js) - Google Analytics