【发布时间】:2016-04-02 07:13:19
【问题描述】:
我有一个 UITabBarViewControllers 有 4 个 ViewControllers 和 4 NavigationController 嵌入使用情节提要。我将按钮作为左侧导航项放在所有 4 个 ViewController 中,它将以编程方式创建 UIView,如下面的屏幕截图所示。
现在这里的问题是我必须在所有 4 个 ViewController 中编写相同的代码。如果将来需要进行重大更改,我将不得不更改所有 ViewController 中的代码。我不知道如何解决这个问题?什么是最好的解决方案。这不是可行的编码方式。而且我是 iOS 开发的新手,所以在解释时要具体。感谢您的阅读。
【问题讨论】:
标签: ios iphone uinavigationcontroller uitabbarcontroller xcode7