我想在我的应用程序中使用UimoDealPrimeTrimeTabl。但我使用的是导航控制器。所以当我写下面的代码时,它没有响应我。我该怎么办?

    [self.navigationController pushViewController:controller animated:YES];

最佳答案

检查下面的样本工作代码。

MyModalViewController *targetController = [[[MyModalViewController alloc] init] autorelease];

targetController.modalPresentationStyle = UIModalPresentationFormSheet;
targetController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; //transition shouldn't matter
[self presentModalViewController:targetController animated:YES];

targetController.view.superview.frame = CGRectMake(0, 0, 200, 200);//it's important to do this after

presentModalViewController targetController.view.superview.center = self.view.center;

摘自-->
How to resize a UIModalPresentationFormSheet?

10-08 06:05