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 supporte开发者_如何学编程d 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.
精彩评论