简体   繁体   中英

Connect multiple view controllers from storyboard to code in Xcode 6

I created multiple view controllers on storyboard. Now I wanna create several view controller .m and .h files to represent these view controllers respectively. How do I connect the file to its correspondent view controllers? For instance, there are 2 view controllers created and I wanna connect FirstViewController.m file to the first view controllers and connect SecondViewController.m file to the second one.

选择控制器,转到身份检查器,然后将类从UIViewController更改为自定义类,该类应显示在下拉菜单中。

ViewControllers on storyboard can have the same class and you can have different models for each.

now it depends on your needs :

  • Panel Utility (on left)
    • identity inspector (3rd from left to right)
    • chose your class or let the default one if you don't need

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM