I have a custom view that creates a mask image in -layoutSubviews. It uses the 
screen scale in order to render the image at the best possible resolution.

But -layoutSubviews is getting called before the view has a window, so I can't 
get the view's screen. I could use the mainScreen, but that might not be 
correct if there are additional screens.

-layoutSubviews is not called when the view finally gets a window. Should I 
override setWindow: and call setNeedsLayout? What's the best way to handle this?

TIA,

-- 
Rick




_______________________________________________

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

Reply via email to