选项卡栏选项卡中的模态翻转,仅视图、故事板
我有一个带有五个选项卡的选项卡栏。
在一个选项卡中我有一个地图视图。我在地图的右下角有一个信息按钮。当用户单击信息按钮时,我希望地图视图翻转到包含有关地图视图信息的视图。我想要导航栏中的后退按钮来翻转。
我怎样才能做到这一点?
我已经成功创建了一个视图控制器并进行了模态转场,但它没有保留标签栏。更糟糕的是,我在 Flipside-ViewController 上创建了一个后退按钮,并以模态方式返回到 MapViewController,当您返回时,选项卡栏就消失了!
我正在使用情节提要,我发现的大多数教程都使用 nib 和 xib。我可以通过情节提要 IB 执行的控制单击次数越多,代码越少越好。任何帮助表示赞赏!
I have a tab bar with five tabs.
In one tab I have a mapview. I have an info button in the bottom right hand corner of the map. When a user clicks the info button, I want the mapview to flip to a view that has information about the mapview. I'd like a back button in the nav bar to flip back.
How can I do that?
I've managed to create a view controller and make a modal segue, but it doesn't keep the tab bar with it. Worse still, I created a back button on the flipside-viewcontroller with a modal segue back to the mapviewcontroller, and when you go back, the tabbar is gone!
I'm using a storyboard, and most tutorials I find use nibs and xibs. The more control-clicking I can do through the storyboard-IB and the less code the better. Any help is appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在故事板的 MapInformation 视图中的
backButton
中创建后,您可以将以下内容添加到 MapInformation.h/m:MapInformation.h:
MapInformation.m:
之后,确保连接您的故事板中的
IBAction
(按住 Control 键单击)。Once you have created in the
backButton
in the MapInformation view in storyboard, you can add the following to your MapInformation.h/m:MapInformation.h:
MapInformation.m:
After that, make sure to connect your
IBAction
in your storyboard(control-clicking).