swift 使用多个storyBoard

其实就是想不把界面都画在一个Storyboard里面

为了这个破问题,在网上查了很多资料,其实很简单

 @IBAction func idQuery(sender: UIButton) {

        let settingsStoryboard = UIStoryboard(name:"IDQueryStoryboard",bundle:nil)

        let viewController = settingsStoryboard.instantiateViewControllerWithIdentifier("IDQuery") as! UIViewController



        self.presentViewController(viewController, animated: true, completion: nil)

        

    }

IDQueryStoryboard是你要调用Storyboard的名,IDQuery是你标识的StoryboardID

swift 使用多个storyBoard

这样设置了发现不行,报Could not find a storyboard 

退出模拟器,从新编译,就可以了

 

你可能感兴趣的:(swift)