Re: UIImagePickerController problem
Re: UIImagePickerController problem
- Subject: Re: UIImagePickerController problem
- From: Luke the Hiesterman <email@hidden>
- Date: Thu, 10 Sep 2009 08:32:40 -0700
You're better off filing a feature request for a landscape image
picker. Honestly, though, I don't see landscape as an orientation that
makes sense for picking images on the phone.
Luke
On Sep 10, 2009, at 8:10 AM, Development wrote:
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
_______________________________________________
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