iOS5 のマスター/詳細アプリケーション テンプレートで、詳細ビューの中央に UIView を配置する際に問題が発生しています。ビューの幅は iPad の画面より狭く、デバイスの向きに関係なく常に中央に表示されます。これが私が試したことです....
- (void)viewDidLoad
{
[super viewDidLoad];
[self.view setAutoresizingMask:(UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin)];
[self.view.layer setBorderWidth:2.0F];
[self.view.layer setBorderColor:[[UIColor orangeColor] CGColor]];
// Do any additional setup after loading the view, typically from a nib.
UIView *someContainerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 600.0F, 56.0F)];
[someContainerView.layer setBorderWidth:2.0F];
[someContainerView.layer setBorderColor:[[UIColor greenColor] CGColor]];
[someContainerView setAutoresizingMask:(UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin)];
[self.view addSubview:someContainerView];
[self configureView];
}
ビューの表示方法は次のとおりです
ここで何が欠けているのか誰か教えてもらえますか????