On Mon, Jan 27, 2014, at 03:39 PM, Rick Mann wrote: > > On Jan 27, 2014, at 15:31 , Kyle Sluder <k...@ksluder.com> wrote: > > > Layout guides work just fine regardless of use of storyboards. But > > because layout guides are owned by the _view controller_, not the view, > > there is nowhere for IB to offer them in non-storyboard views. > > Well, since a NIB can be owned by a view controller, it seems to me that > IB could provide layout guide widgets when that's the case.
Storyboard object graphs are much more restricted than NIB object graphs. The relationship between view controllers and their views is much more concrete within a storyboard. NIBs are much more flexible—you can specify the _class_ of File's Owner, but that object does not exist in the NIB at design time. Therefore the constraint object can't be encoded into the nib. Labeling File's Owner as a UIViewController also implies absolutely nothing about the relationship between the view controller and the view—the view controller might manually load the NIB with itself as File's Owner for purposes other than assigning its own view. These difficulties are theoretically surmountable and you should file an enhancement request asking Apple to do so. But as it stands, the only way to use the layout guides for views loaded from NIBs is in code. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com