網頁

2012年6月26日 星期二

UIInterfaceOrientationLandscapeLeft

The app currently displays in portrait orientation, but you want it to be in landscape in order to use the available space optimally for the charts. To fix this, edit CorePlotDemo-Info.plist in the “Supporting Files” folder. Select the PLIST file, expand the bottom row that reads “Supported interface orientations,” and delete all but “Landscape (left home button).”
Next add a new entry to the file. First, collapse “Supported interface orientations” (if it’s expanded), and then right-click the bottom row and select “Add Row.” Enter “Initial interface orientation” as the key and select “Landscape (left home button)” as the corresponding value.
 
#pragma mark - Rotation
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    //return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
    //return YES;
    return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
} 

沒有留言:

張貼留言

注意:只有此網誌的成員可以留言。