代码:
HDComposeViewController *vc = [[HDComposeViewController alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentModalViewController:nav animated:YES];
当前的模态视图在设备旋转时无法旋转。如果我更改modalPresentationStyle
为UIModalPresentationFormSheet
,它的工作原理!
HDComposeViewController 已经实现了旋转委托:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
- (BOOL)shouldAutorotate
{
return YES;
}
有什么不对的吗?谢谢。