Tôi đang sử dụng mã nàypresentViewController không hỗ trợ định hướng trong iOS 6
if ([self respondsToSelector:@selector(presentViewController:animated:completion:)])
{
[self presentViewController:navigationControllerCustom animated:YES completion:nil];
}
else
{
[self presentModalViewController:navigationControllerCustom animated:YES];
}
Ứng dụng của tôi có hai định hướng Portrait và Portrait lộn ngược. Mã này hoạt động tốt với iOS 5.1, nhưng định hướng không hoạt động trên iOS 6
Tôi cũng đã thêm mã này vào lớp navigationControllerCustom
tôi
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown);
}
-(NSUInteger)supportedInterfaceOrientations
{
return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown);
}
Xin hãy giúp tôi để giải quyết vấn đề này.
Xin cảm ơn trước.
ive gặp vấn đề tương tự trong các ứng dụng tôi đã biên soạn cho iOS 6; tất cả các định hướng hoạt động ngoại trừ UIInterfaceOrientationPortraitUpsideDown; kỳ lạ của nó. – MrJre
@MrJre Bất kỳ giải pháp nào giống như thế này thực sự là lạ. –