English 中文(简体)
iPhone view is 3/4 grey, could be rotated incorrectly
原标题:

This problem has just come up when I cleaned all targets and soft resetted (held home & power for about 10 seconds) my iPod Touch (2nd gen). It looks like the view might be rotated portrait.

Here is a pic of the problem:

alt text http://img7.imageshack.us/img7/5582/iphonescreenshot.png

The view is linked to a XIB file, and I setup landscape in interface builder. I also use

<key>UIInterfaceOrientation</key>
<string>UIInterfaceOrientationLandscapeRight</string> 

in the info.plist file, and use

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

in the main view controller and the sub view controller.

My view hierarchy is: App delegate Window (Linked to App Delegate) -> MainViewController View (Linked to MainViewController) -> SubViewController View (Linked to SubViewController).

Thanks,

Niall.

EDIT: I m trying to achieve a full black full screen view. The width and height look OK in IB. (480,320)

问题回答

Check your spring-and-struts in IB; without knowing what you re TRYING to achieve here, it s hard to recommend a course of action. I imagine you d like fullscreen, either black or gray, so most likely you ve not set the view in question to be full-width and -height.





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签