开发者

Rotate Address Book Controller

开发者 https://www.devze.com 2022-12-08 04:34 出处:网络
I am wondering if there is some way to rotate a created ABPeoplePickerNavigationController.I am creating the ABPeoplePickerNavigationController like this:

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!


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消