add UIViewController in subview

后端 未结 9 2206
情深已故
情深已故 2020-12-14 20:21

I don\'t know if this is the right key to search \"add UIViewController in subview\". As what you can see in my image ,there are two ViewController, the main and the second

9条回答
  •  离开以前
    2020-12-14 20:59

    You can do this simply by using StoryBoards

    • Open storyboards and select the view controller in which your Blue view is present, open Utilities search for ContainerView and drag it into your blue view, this will automatically adds an view controller that acts as child view for your view. You can resize your container view in size inspector.

    enter image description here

提交回复
热议问题