怎么从Storyboard中构造一个ViewController?

2024-12-03 21:36:16
推荐回答(3个)
回答1:

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil]; ViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"ViewControllerIdentifier"]; //storyboard ID

回答2:

多谢两位,按照楼上方法解决了2#的方式我也记下来了,以后备用

回答3:

http://ryan.easymorse.com/?p=72