views:

111

answers:

2

Hi Everyone:

I am wondering if there is some way to rotate a created ABPeoplePickerNavigationController. I am creating the ABPeoplePickerNavigationController like this:

ABPeoplePickerNavigationController *addressBook =  [[ABPeoplePickerNavigationController alloc] init];
addressBook.peoplePickerDelegate = self;
[self presentModalViewController:addressBook animated:YES];

My application is in landscape mode, and I am wondering how I can get this created controller to rotate like the rest of the application. As the Address Book application does this without any problems, I assume it is a pretty easy fix.

Thanks for any help!

A: 

Hope this may work , but try out atleast

[addressBook.view setTransform : CGAffineTransformMakeRotation( 90 * M_PI/ 180)];

The idea is to rotate the ABPeoplePickerNavigationController's view by transformation.

Biranchi
Unfortunately, this didn't seem to work for me. Any other ideas?
PF1
+1  A: 

I would look int possibly overriding - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation and making sure it returns YES for landscape.

lll