• 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: View shifted up on iPhone simulator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: View shifted up on iPhone simulator


  • Subject: Re: View shifted up on iPhone simulator
  • From: Anthony Smith <email@hidden>
  • Date: Fri, 2 Oct 2009 15:57:19 -0400

Sorry, I just reread your previous message. I layout the view in IB. I load the view programmatically. I'm also using the 3.1 simulator.

On Oct 2, 2009, at 3:52 PM, Anthony Smith wrote:

I don't do any size or position calculations. I just set the view. I don't do anything fancy. This is the only area of the code I mess with the view.

On Oct 2, 2009, at 3:51 PM, Hank Heijink (Mailinglists) wrote:

Doesn't look like the relevant code to me: I see no size or position calculations here. That's where your problem will be.

Hank

On Oct 2, 2009, at 3:48 PM, Anthony Smith wrote:

I'm doing it programmatically. I'll see if I can figure that out when I get a chance. Here's the relevant code in my app delegate:

- (UIView *)determineView {
Device device = [DeviceDetection currentDevice];

if (device == IPOD_1G || device == IPOD_2G || device == UNKNOWN) {
[self setViewController:[[UIViewController alloc] initWithNibName:@"UnsupportedDeviceView" bundle:[NSBundle mainBundle]]];
} else {
[self setViewController:[[ShuffleViewController alloc] initWithNibName:@"ShuffleView" bundle:[NSBundle mainBundle]]];
}

return [viewController view];
}



- (void)applicationDidFinishLaunching:(UIApplication *)application { [window addSubview:[self determineView]]; [window makeKeyAndVisible]; }

On Oct 2, 2009, at 3:40 PM, Hank Heijink (Mailinglists) wrote:

I believe -[UIScreen applicationFrame] returns different values for phone and simulator in OS 3.0. From your screenshots I have no idea if that's your problem though. Did you layout your view in IB or did you do that programmatically?

Best to set a breakpoint where you position your content, or at least in -viewDidLoad and find out where exactly the difference is.

Good luck,
Hank

On Oct 2, 2009, at 3:28 PM, Anthony Smith wrote:

When I run my app in the iPhone simulator the view seems to be shifted up on the screen. If that doesn't make sense I've uploaded some images. Take a look and see if you've run into this before.

http://projects.sticksnleaves.com/iphonedev/ib.png

http://projects.sticksnleaves.com/iphonedev/sim.png

Thanks!_______________________________________________

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





Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >View shifted up on iPhone simulator (From: Anthony Smith <email@hidden>)
 >Re: View shifted up on iPhone simulator (From: "Hank Heijink (Mailinglists)" <email@hidden>)
 >Re: View shifted up on iPhone simulator (From: Anthony Smith <email@hidden>)

  • Prev by Date: Re: odd behavior with NSError?
  • Next by Date: Disable CD Ejection
  • Previous by thread: Re: View shifted up on iPhone simulator
  • Next by thread: Re: View shifted up on iPhone simulator
  • Index(es):
    • Date
    • Thread