Re: View shifted up on iPhone simulator
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