简体   繁体   中英

Unable to set a custom class for UITabBarController

I am following an intro to Swift guide and have an issue with one of the practical examples. I'm not able to set the custom class for a UITabBar via the dropdown on the storyboard.

I have other blank scenes that I can change to the custom class that I want. Just not the UITabBar . The other instances where a similar question to this was asked, don't resolve my issue.

For reference I have "ViewController" and "SecondViewController" files which can be referenced in these other scenes. I am using Xcode 11.

Also below is the example I am trying to work from:

继承自 UIViewController

我用作参考的示例

And here is my project:

我的 Xcode 项目

You have not created any SecondViewController class.

Go to File-> New -> File -> Cocoa Touch Class -> Name of Class and tap create.

Go to Xcode > File > New File and then create a SecondViewController subclass of UITabBarController then assign in to TabBar controller in storyboard

在此处输入图片说明

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