• 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: UIView final frame after device rotation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UIView final frame after device rotation


  • Subject: Re: UIView final frame after device rotation
  • From: David Duncan <email@hidden>
  • Date: Tue, 02 Apr 2013 13:39:17 -0700

On Apr 2, 2013, at 1:25 PM, Markus Spoettl <email@hidden> wrote:

> On 4/2/13 8:37 PM, David Duncan wrote:
>>> I have a hard time figuring out how to get the frame (in the window
>>> coordinate system) a view will rotate to, when the rotation has just
>>> begun.
>>
>> What are you trying to do?
>>
>> Typically you don't need to worry about this. The root view controller's view
>> will have its frame set properly by UIKit, and then all of your other views
>> will resize with respect to that view's bounds, and as such you don't need to
>> know how to get the final frame of that view.
>
> I'm displaying an overlay window which is "attached" to the view in question.

I would think there might be an easier way to do this rather than using an overlay window, but I'm not entirely certain what your end goal is or what you are trying to overlay. You might consider an approach that uses view controller containment however.

> When the rotation takes place, it needs to realign itself so that it's new location agrees with what the view displays (in my context).


Have you tried doing this inside of -viewDidLayoutSubviews for the view controller that is managing all of this? That should be the best place to get the location of views after the layout has completed, although the animation information would need to be obtained seperately.
--
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

  • Follow-Ups:
    • Re: UIView final frame after device rotation
      • From: Markus Spoettl <email@hidden>
References: 
 >UIView final frame after device rotation (From: Markus Spoettl <email@hidden>)
 >Re: UIView final frame after device rotation (From: David Duncan <email@hidden>)
 >Re: UIView final frame after device rotation (From: Markus Spoettl <email@hidden>)

  • Prev by Date: Re: UIView final frame after device rotation
  • Next by Date: Re: Providing a Service without activating an app
  • Previous by thread: Re: UIView final frame after device rotation
  • Next by thread: Re: UIView final frame after device rotation
  • Index(es):
    • Date
    • Thread