Re: Constraints to TopLayoutGuide
Re: Constraints to TopLayoutGuide
- Subject: Re: Constraints to TopLayoutGuide
- From: Kyle Sluder <email@hidden>
- Date: Sat, 04 Jan 2014 10:21:07 -0800
On Sat, Jan 4, 2014, at 07:58 AM, Gerriet M. Denkmann wrote:
> But this is kind of tedious and I would like to know: can this be done in
> Xcode? Pinning the top of the SearchBar to the bottom of the
> TopLayoutGuide?
Tried this in Xcode 5.0.1.
This only seems to work in the Storyboard editor, but you can align the
top edge of your view with the bottom edge of the simulated status bar
and use the "Add New Constraints" popover (triggered from a button in
the lower-right corner of the window) to create the top constraint. It
should have a default value of 0, which means that IB has figured out
you want to align to the top layout guide, not the superview.
Since topLayoutGuide is a property of UIViewController, not UIView, I
can foresee that adding such support to the regular XIB editor would be
very difficult. But maybe there's some specific set of circumstances in
which it could be made to work.
--Kyle Sluder
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden