使用故事板 ioS5 时从视图控制器移动到选项卡栏控制器
我在故事板中创建了一个工作完美的选项卡栏控制器。现在我需要从视图控制器移动到此选项卡栏控制器。我没有为选项卡栏控制器提供单独的类。然而,我尝试为这个选项卡栏控制器创建一个类,但是当我调用它/初始化它时,它只是提供一个新的选项卡栏,而不是故事板上的内容。我已经坚持了一段时间了,所以任何帮助将不胜感激。所以应用程序是这样工作的。视图控制器1 ->视图控制器2 -> tabbarcontroller(有一个表视图和一个地图视图)
I created a tab bar controller in a story board which is working perfect. Now i need to move from a view controller to this tab bar controller. I do not have a separate class for the tab bar controller. However I tried creating a class for this tab bar controller but when i call it/initialise it, it just gives a new tab bar instead of whats on the storyboard. Ive been stuck with this for a while now so any help would be appreciated. So application works this way. viewcontroller1 -> viewcontroller2 -> tabbarcontroller (which has a table view and a map view)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我正确理解你的问题,你想要做的就是在属性检查器中为 Storyboard 中的 TabBarController 分配一个标识符,然后使用它使用以下代码以编程方式实例化控制器:
If I understand your question correctly, what you want to do is assign an identifier to the TabBarController in the Storyboard, in the Attributes Inspector, and then use that to programmatically instantiate the controller using this code: