• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: layout method not getting called on Content View
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: layout method not getting called on Content View


  • Subject: Re: layout method not getting called on Content View
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 16 Apr 2015 19:42:34 +0000

On Apr 16, 2015, at 12:21 , Dave <email@hidden> wrote:
>
> On iOS, there is a method called “layoutSubviews” that I’ve used to do this sort of thing in the past, so it was deemed the correct place to do this in iOS, I assumed it would be the same or similar for Mac.

No, it’s “old school” on the Mac.

> I’m not sure where in the process to set the Frame, because if I do it just after the NIB is loaded it doesn’t seem to have any effect.


If you’re talking about a window NIB, then you have to defer rearrangement of the window contents until the window loading process is fully complete. The easiest way is to set the subview frames in your window controller’s ‘windowDidLoad’ override.

After that, you should be able to set the subview frames at any time.

There are earlier possible points of intervention, but it’s tricky because you have to be certain that the outlets you’re using to get references to the subviews have be set up, and that nothing else is going to intervene and undo what you did. ‘windowDidLoad’ is the One, True™ ending point of the loading process, though, so it’s not worth making things any harder than that.


_______________________________________________

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


  • Follow-Ups:
    • Re: layout method not getting called on Content View
      • From: Dave <email@hidden>
References: 
 >layout method not getting called on Content View (From: Dave <email@hidden>)
 >Re: layout method not getting called on Content View (From: Kyle Sluder <email@hidden>)
 >Re: layout method not getting called on Content View (From: Dave <email@hidden>)
 >Re: layout method not getting called on Content View (From: David Duncan <email@hidden>)
 >Re: layout method not getting called on Content View (From: Dave <email@hidden>)
 >Re: layout method not getting called on Content View (From: email@hidden)
 >Re: layout method not getting called on Content View (From: Dave <email@hidden>)
 >Re: layout method not getting called on Content View (From: Quincey Morris <email@hidden>)
 >Re: layout method not getting called on Content View (From: Dave <email@hidden>)

  • Prev by Date: Re: layout method not getting called on Content View
  • Next by Date: Re: layout method not getting called on Content View
  • Previous by thread: Re: layout method not getting called on Content View
  • Next by thread: Re: layout method not getting called on Content View
  • Index(es):
    • Date
    • Thread