新建方式参考:http://blog.csdn.net/yeness/article/details/50095285
**右侧底部筛选为:**UINavigationController
新建后台代码参考:http://blog.csdn.net/yeness/article/details/50095285
后台代码继承原为:UIViewController ,改为 UINavigationController
import UIKit
class FourViewController: UINavigationController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
print("Four");
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
为这个新建视图,关联Class
启动模拟器,运行
底部All Output窗口输出: Four
本文介绍了一个使用 Swift 语言创建 UINavigationController 的实例。通过继承 UINavigationController 来创建一个名为 FourViewController 的类,并在 viewDidLoad 方法中打印 “Four” 以验证视图加载成功。
swift新增一个顶部菜单导航视图(UINavigationController)&spm=1001.2101.3001.5002&articleId=50095415&d=1&t=3&u=3f10a915b9aa4f8f836f70245e149a50)
554

被折叠的 条评论
为什么被折叠?



