私はこのコードを持っています:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
-(void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
if( UIInterfaceOrientationIsLandscape(toInterfaceOrientation) )
{
[[NSBundle mainBundle] loadNibNamed:@"ChatViewController-landscape" owner:self options:nil];
}else {
[[NSBundle mainBundle] loadNibNamed:@"ChatViewController" owner:self options:nil];
}
}
if(UIInterfaceOrientationIsLandscape(toInterfaceOrientation)行にブレークポイントを設定しましたが、初めてそのコード行に入力されませんでした。電話を回すと、その時間と後続のメソッドが呼び出されます。そのメソッドを呼び出すにはどうすればよいですか。初めて?