Я создал UIViewController с помощью раскадровки и связал его с классом UIViewController.
Я хотел бы, чтобы мой UIViewController поддерживал только портретную ориентацию, я пробовал код удара, но, похоже, он не работает. мой UIViewController все еще вращается.
Нужно ли мне изменять какое-либо свойство в раскадровке?
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return ((interfaceOrientation == UIInterfaceOrientationPortrait) || (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown));
}