ポップオーバーを使用してビューを表示しようとしています。UIPopoverController は IPhone では機能しないため、WEPopoverController を使用します。
私のコード:
UIViewController *controller = [[UIStoryboard storyboardWithName:@"Main" bundle:nil]instantiateViewControllerWithIdentifier:@"GetDateController"];
controller.modalPresentationStyle = UIModalPresentationPopover;
WEPopoverController *pop = [[WEPopoverController alloc] initWithContentViewController:controller];
pop.delegate = self;
CGRect screen = [[UIScreen mainScreen]bounds];
CGRect r = CGRectMake(8, 8, screen.size.width-8, 57);
pop.popoverContentSize = r.size;
[pop presentPopoverFromRect:CGRectMake(200, 100, 0, 0) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
プログラムを起動すると、ポップ オーバー ウィンドウが表示されますが、すぐに消えます。IPhone プログラムのクラッシュで UIPopoverController を使用すると、iPad ではすべてが正しく動作します。
WEPopoverController を機能させるにはどうすればよいですか?
アレクサンダー。