Move or copy view controller from one storyboard to another

前端 未结 9 858
暖寄归人
暖寄归人 2021-01-30 19:46

I have several UIViewControllers in one Storyboard. Now I want to move some UIViewControllers to another Storyboard. Is it possible?

9条回答
  •  执念已碎
    2021-01-30 20:06

    If using Cut-n-Paste fails for you, there is a workaround. Paste will fail if there is now ViewController in the file that is being pasted in. That makes it impossible to select the storyboard for pasting. XCode will refuse to paste. So you need to first drag in an empty view controller into the storyboard from the library. Then select this viewController in the storyboard and then the paste will work. After you are done pasting you can delete the dummy viewController. You won't need it again.

提交回复
热议问题