UIImagePickerController problem
UIImagePickerController problem
- Subject: UIImagePickerController problem
- From: Development <email@hidden>
- Date: Thu, 10 Sep 2009 08:10:53 -0700
I'm working on an app that is in landscapeleft mode most of the time.
I need to be able to pick an image but even after subclassing the
imagepickercontroller and returning yes for the -(BOOL)
shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)
toInterfaceOrientation
when the orientation is landscape the imagePicker is displayed in
portrait.
I have attempted to maunally rotate the view but I get unpredictable
image selection results. This is my rotation code:
-(void)rotateView:(UIView*)theView
{
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:.5];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
if (self.interfaceOrientation == UIInterfaceOrientationLandscapeLeft) {
theView.transform = CGAffineTransformIdentity;
theView.transform = CGAffineTransformMakeRotation
(degreesToRadian(270));
theView.bounds = CGRectMake(0.0, 0.0, 480, 320);
}
theView.center = CGPointMake(160.0f, 240.0f);
[UIView commitAnimations];
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden