• 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
Subject: Re: iPad interface orientation basics
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Subject: Re: iPad interface orientation basics


  • Subject: Subject: Re: iPad interface orientation basics
  • From: Gordon Apple <email@hidden>
  • Date: Mon, 17 May 2010 12:29:08 -0500
  • Thread-topic: Subject: Re: iPad interface orientation basics

If you think that's confusing, wait until you try to use an external monitor
and see what the rotation does to you.  So far, I've successfully managed to
counter-rotate the external view's window so my text stays upright, but
getting the view and its contents to scale properly is proving more elusive.
I'm not even sure I know x from y or width from height in this environment.


On 5/17/10 12:02 PM, "email@hidden"
<email@hidden> wrote:

> On May 14, 2010, at 8:17 AM, David Duncan wrote:
>
>> On May 12, 2010, at 12:52 PM, sebi <email@hidden> wrote:
>>
>>> hello,
>>>
>>> sorry, this is probably a very simple thing, but i am quite puzzled right
>>> now.
>>>
>>> when i do this in my view controller:
>>>
>>> -
>>> (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfac
>>> eOrientation {
>>> CGSize size = self.view.frame.size;
>>> NSLog(NSStringFromCGSize(size));
>>> }
>>>
>>> the size is always {768, 1024}, regardless of the orientation. why is it not
>>> {1024, 768} in landscape mode? The view definitely changes its size, since
>>> it always fills the full screen...
>>
>> Because the frame is in the parent coordinate system, and technically that
>> coordinate system doesn't change when you rotate. If you look at the bounds
>> instead, you will find that they have changed as you expect, because the
>> bounds is in the view's own coordinate system.
>> --
>> David Duncan
>
>
> Hello,
>
> Thanks, but sorry, I don't get it. Also the net is full of questions and very
> few answers regarding this topic, so I don't seem to be the only one.
> I have a ViewController with a view. In that view there is an UIImageView
> background subview. Now, when I rotate the device I want to switch the image
> of the UIImageview so it fills the view again without being distorted. The
> only working method I found out up to now is to determine the correct values
> for the views frames and bounds by try and error and to hardcode them into the
> didRotateFromInterfaceOrientation method. Isn't there any example that shows
> how this is done properly? I downloaded all of apple samplecode and didn't
> find anything:
>
> Thanks and regards,
> Sebastian Mecklenburg



_______________________________________________

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

  • Prev by Date: Re: creating a UITableView on an "Utility application" project
  • Next by Date: Style Advice for using NSEnumerator
  • Previous by thread: [iPhone] How to access the Cancel button in a search bar?
  • Next by thread: Style Advice for using NSEnumerator
  • Index(es):
    • Date
    • Thread