• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UIImagePickerController problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: UIImagePickerController problem
      • From: Luke the Hiesterman <email@hidden>
  • Prev by Date: Re: How can we draw a horizontal line with embossing effect?
  • Next by Date: Re: XC & IB 3.2 overlapping siblings
  • Previous by thread: Re: CGWindowListCreateImage fails on Snow Leopard with kCGNullWindowID
  • Next by thread: Re: UIImagePickerController problem
  • Index(es):
    • Date
    • Thread