【发布时间】:2017-12-13 03:46:36
【问题描述】:
我有一个带有 4 个选项卡的 TabBarController。 When the second tab is selected I would like to make an api call to get data & then, once the data returns, display the data in the destination view controller (let's call it SecondViewController).
我相信我应该做的是将 SecondViewController 连接到 TabBarController,并在情节提要中使用“显示”segue。但是,似乎我必须使用“relationship segue”将 TabBarController 连接到 SecondViewController 才能显示选项卡图标。所以我都连接好了。
选择第二个选项卡时,在返回必要的数据之前立即显示第二viewController。关于如何解决这个问题的任何想法?
我已经用谷歌搜索了几个小时,但没有找到任何有用的建议。我发现的一个有点相关的stackoverflow问题是Prepare for Segue
【问题讨论】:
标签: iphone swift uitabbarcontroller uistoryboardsegue