开发者

Fixed:Lanscape only not working in iOS5

I have updated my iPod to iOS5 and xcode to 4.2 but none of my application views are running in landscape i have done the following:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}

Although the default for this line is:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

In my view i have set orientation to Landscape. In Summary under 'Supported Device Orientations' i only have Landsca开发者_如何学Gope left selected. And lastly in Info.plist i have added Initial interface orientation = Landscape (left home button)

So when i run on my iPod & iPhone Simulator running iOS5 the device rotes left but the view does not move much.

But if i run it on iPhone Simulator running 4.2 it rotes and becomes landscape.

I don't know if this is something i am doing wrong with the new iOS/xcode or there is a problem.

Thanks in advance. Eli

UPDATE PROBLEM SOLVED: It was caused by

Initial interface orientation = Landscape (left home button)

Changed it to

Initial interface orientation = Portrait (bottom home button)


UPDATE PROBLEM SOLVED: It was caused by

Initial interface orientation = Landscape (left home button)

Changed it to

Initial interface orientation = Portrait (bottom home button)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜