美文网首页
iOS-代码加载storyboard中的ViewControl

iOS-代码加载storyboard中的ViewControl

作者: wodeph | 来源:发表于2017-11-21 17:42 被阅读0次

UIStoryboard *board = [UIStoryboard    storyboardWithName: @"Main" bundle: nil];//Main你自己工程里面的Storyboard的名字

SLLightDeviceViewController * desVC = [board instantiateViewControllerWithIdentifier: @"SLLightDeviceViewController"];//Identifier是你想要得到的控制器在Storyboard的identity

相关文章

网友评论

      本文标题: iOS-代码加载storyboard中的ViewControl

      本文链接:https://www.haomeiwen.com/subject/wfvjvxtx.html