> On Feb 1, 2016, at 19:47 , Alex Zavatone <z...@mac.com> wrote: > > Check out how I did it where the search bar is within the scene’s view and > the scene’s view is the top level view. Hopefully, this will translate from > iOS to OS X.
Not sure why you keep suggesting OS X. This is iOS. The problem is the designers want it over the nav bar, not in the view. > > I don’t have the code with me at the moment, but on iOS, there were two a > settings I had to change to make my other view not offset down an extra 44 > pixels. I had to set the nav bar AND status bad to transparent or opaque and > then set the “Layout Adjusts Scroll View Insets" for the view controller. > What I’m getting at is that if the direct options aren’t in your custom class > in the storyboard, they may be in a containing class like a nav controller. > > Hoping that this translates over to Mac OS. > > > On Feb 1, 2016, at 7:36 PM, Rick Mann <rm...@latencyzero.com> wrote: > >>> >>> On Feb 1, 2016, at 16:06 , Alex Zavatone <z...@mac.com> wrote: >>> >>> >>> On Feb 1, 2016, at 5:42 PM, Rick Mann <rm...@latencyzero.com> wrote: >>> >>>> I've got a UISearchController that I present (presentViewController) as a >>>> result of the user tapping a button. When this hapens, the >>>> currently-display UINavigationBar slides up off the top of the screen, and >>>> the UISearchBar slides down, but it overlaps the status bar. >>>> >>>> None of the answers on coming up in a google search seem to work or be the >>>> right way (e.g. setting edgesForExtendedLayout to .None, or actually >>>> adjusting the offset in the delegate; that seems terrible). >>>> >>>> Is there a "correct" way (that also works)? >>>> >>> >>> iOS? Mac OS? >> >> I don't think UI... exist on OS X. >> >>> What is the parent view of the UISearchBar? >> >>> How are you adding it to the parent view? There are some obscure settings >>> on iOS in the Navigation controller that seriously affect the offset of >>> content if you’re displaying a nav bar. >> >> It is a UISearchController, presented modally. The UISearchController is >> handling adding the search bar to the window, not sure how. Here's the code: >> >> http://pastebin.com/eYB7ba9f >> >> Examining the view hierarchy after it presents shows a couple full-screen >> views covering the UINavigationController views, and some bar views that are >> not UINavigationBars (AFAICT). I don't *think* the nav controller has any >> effect on this presentation. >> >> Screenshot: >> >> >> http://cl.ly/2r3i1U1l2d3J/Simulator%20Screen%20Shot%20Feb%201,%202016,%2016.35.30%20.png >> >> >> -- >> Rick Mann >> rm...@latencyzero.com > -- Rick Mann rm...@latencyzero.com _______________________________________________ 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