In iOS 5 läuft es richtig:Fehler präsentieren Controller Ansicht zentriert in iPad iOS 6
PinRequiredViewController *pinView = [[PinRequiredViewController alloc]initWithNibName:@"PinRequiredView" bundle:nil];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:pinView];
// show the navigation controller modally
navController.modalPresentationStyle = UIModalPresentationFormSheet;
navController.modalInPopover = NO;
navController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentViewController:navController animated:YES completion:nil];
navController.view.superview.frame = CGRectMake(0, 0, 250, 250);
navController.view.superview.center = self.view.window.center;
Aber nicht in iOS6 funktioniert gut, der Blick bleibt nicht auf dem Bildschirm zentriert, Portrait und Landschaft. Irgendwelche Lösungen?
Danke !! :)
Ich habe das gleiche Problem und kann es nicht lösen. Wurde verwendet, um vor iOS 6 zu funktionieren. –
@ Javi_576 Was genau ist das Problem hier? Fragen, die "nicht funktionieren" sagen, sind keine gründliche Beschreibung des Problems. Sagst du, dass es überhaupt nicht vorkommt? –
Nein, die Ansicht ist in iOS5 mit diesem Code zentriert, aber nicht in iOS6. –