- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{
return YES;
}
-(BOOL)shouldAutorotate{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskAll;
}
typedef NS_OPTIONS(NSUInteger, UIInterfaceOrientationMask) {
UIInterfaceOrientationMaskPortrait,
UIInterfaceOrientationMaskLandscapeLeft,
UIInterfaceOrientationMaskLandscapeRight,
UIInterfaceOrientationMaskPortraitUpsideDown,
UIInterfaceOrientationMaskLandscape,
UIInterfaceOrientationMaskAll,
UIInterfaceOrientationMaskAllButUpsideDown,
};
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
[self.view setBackgroundColor: [UIColor groupTableViewBackgroundColor]];
// Group style table view backgrounds can no longer be represented by a simple color.
// If you want to have a background in your own view that looks like the table view background,
// then you should create an empty table view and place it behind your content.
UITableView* emptyTableView = [[UITableView alloc] initWithFrame: self.view.bounds style: UITableViewStyleGrouped];
[self.view addSubview: emptyTableView];
[emptyTableView release];