iOS中storyboard的問題
伊谢尔伦
伊谢尔伦 2017-05-17 10:05:01
0
5
692

storyboard中設定了兩個介面。

在程式碼中使用

[self.navigationController pushViewController:[[SCMainViewController alloc]init] animated:YES];

怎麼跳轉過去沒有載入啊

不能再用純程式碼方式去跳轉了嗎。 。只能用segue嗎

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

全部回覆(5)
習慣沉默

可以跳轉的,感覺你的 Stroyboard 上相对应的 ViewController 没有关联 Class - SCMainViewController

習慣沉默

雷雷

漂亮男人

先要在storyBoard裡面填好StoryBoard ID

然後使用下面的程式碼載入viewController:

UIViewController *listController = [[UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:@"listViewController"];
小葫芦

1.綁定類別

2.push

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!