iT邦幫忙

DAY 17
4

APP 開發好好玩系列 第 14

iOS 當中,直接從 StoryBoard 取得 ViewController 並且 push 的方法

iOS 當中,直接從 StoryBoard 取得 ViewController 並且 push 的方法

    DetailViewController *detail= [self.storyboard instantiateViewControllerWithIdentifier:@"DetailViewController"];

如果不是直接使用 StoryBoard 拉 push 的 Segue ,那麼我們可以用上述的方法,取得下一個 ViewController 的實體,來進行 push segue 的動作.
不過這時候,在 StoryBoard 的設定上,我們還是得在 StoryBoard 上面設定 Storyboard id ,才可以用這個 StoryBoard id 來取得 ViewController


上一篇
iOS push to next View Controller
下一篇
UIPageViewController 呈現內容的方法
系列文
APP 開發好好玩27
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言