开发者

Interface Builder layout ViewController with its own nib

开发者 https://www.devze.com 2022-12-31 22:08 出处:网络
I would like to be able to decide where a sub view is placed, when that view is controlled by its own view controller. This happens frequently on th开发者_开发百科e iPad when you have a semi-complicat

I would like to be able to decide where a sub view is placed, when that view is controlled by its own view controller. This happens frequently on th开发者_开发百科e iPad when you have a semi-complicated view that doesn't fill the entire screen.

So, imagine that I want the sub view controller's nib to decide its own width, components, connections, etc, while the parent nib would decide where that view/nib would be placed.

I'd really like to lay it out visually instead of programatically. How can I?


Create a view in the parent nib. Connect it to a "subViewContainer" outlet. When you add the SubViewController, add its view to the container instead of self.view.

0

精彩评论

暂无评论...
验证码 换一张
取 消