1

私はこれを持っています:

SomeViewController* vc = [[SomeViewController alloc] init];
self.view.backgroundColor = [UIColor clearColor];
self.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentModalViewController:vc animated:YES];

空白の黒い画面が表示されます-修正方法は?何か案は?

4

2 に答える 2

0

ここでのパーティーには少し遅れますが、このモーダルビューコントローラーをvcから初期化する場合はUINavigationController、UINavigationControllerでmodalPresentationStyleを設定してみてください。

self.navigationController.modalPresentationStyle = UIModalPresentationCurrentContext;
于 2012-12-06T15:30:24.797 に答える
0

これは、ViewControllerの有効な初期化子ではないようです。use – initWithNibName:bundle:サブクラスがUIViewControllerの直接サブクラスである場合

于 2012-08-16T20:00:38.097 に答える