Ich versuche, die Ansicht mit Popover anzuzeigen. Da UIPopoverController nicht auf IPhone funktioniert, verwende ich WEPopoverController.WEPopoverController show view und nach der Sekunde geschlossen
Mein Code:
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];
Wenn ich das Programm starten, sehe ich einen Pop über Fenster, die sofort verschwindet. Wenn ich UIPopoverController auf IPhone Programmabsturz benutze, funktioniert auf iPad alles richtig.
Was muss ich mit WEPopoverController tun, damit es funktioniert?
Alexander.
Jetzt Popover sind in iPhone iOS8 möglich. Sie können - (UIModalPresentationStyle) adaptivePresentationStyleForPresentationController: (UIPresentationController *) Controller { return UIModalPresentationNone; }, um das gleiche Popover in iPhone –