Rotation carnet d'adresses Controller
-
19-09-2019 - |
Question
Je me demande s'il y a un moyen de faire pivoter un ABPeoplePickerNavigationController créé. Je crée le ABPeoplePickerNavigationController comme ceci:
ABPeoplePickerNavigationController *addressBook = [[ABPeoplePickerNavigationController alloc] init];
addressBook.peoplePickerDelegate = self;
[self presentModalViewController:addressBook animated:YES];
Mon application est en mode paysage, et je me demande comment je peux obtenir ce contrôleur créé pour tourner comme le reste de l'application. Comme l'application Carnet d'adresses fait sans aucun problème, je suppose qu'il est une solution assez facile.
Merci pour toute aide!
La solution
Je regarderais int peut-être primordial - (BOOL) shouldAutorotateToInterfaceOrientation:. (UIInterfaceOrientation) interfaceOrientation et en vous assurant qu'il retourne OUI pour le paysage
Autres conseils
Espérons que cela peut fonctionner, mais essayer atleast
[addressBook.view setTransform: CGAffineTransformMakeRotation (90 * M_PI / 180)];
L'idée est de faire tourner la vue par la transformation du ABPeoplePickerNavigationController.