Re: Spanning UITextField on navigation bar
Re: Spanning UITextField on navigation bar
- Subject: Re: Spanning UITextField on navigation bar
- From: David Duncan <email@hidden>
- Date: Mon, 09 Feb 2015 09:44:57 -0800
> On Feb 9, 2015, at 6:21 AM, Aaron Lewis <email@hidden> wrote:
>
> Hi,
>
> I'm trying to put only a UITextField and a bar button on a navigation bar.
>
> The text field will take both the space of both left and the middle space.
>
> Is that possible? In Xcode I can't drag it like that, it's either left or middle
There are 3 regions for a navigation bar, the left & right regions which contain bar button items, and the center which contains a title view. If there is no title, the bar items can stretch into that region to a fair degree without you needing to do much more than ensuring that your view is large enough (setting its frame or bounds before setting the corresponding bar button item on the bar for example).
Please do not add additional subviews to UINavigationBar (or UIToolbar or UITabBar). That will only end in pain and suffering.
--
David Duncan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden