Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4273286
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:41:32+00:00 2026-05-21T07:41:32+00:00

I have an UIView that is used for overlaying a cameraPicker. Into this View,

  • 0

I have an UIView that is used for overlaying a cameraPicker. Into this View, I have an ImageView into which I put the image (image property) taken by the camera.

When the photo is taken with the iPhone in horizontal position, the image is rotated into the ImageView. That’s bad because the user don’t see the picture as it has been taken.

I had put those lines of code into the ViewController that manages the overlay View (File’s owner) :

- (void)didAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
    NSLog(@"didAnimateFirstHalfOfRotationToInterfaceOrientation");
}

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
    NSLog(@"didRotateFromInterfaceOrientation");
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    NSLog(@"shouldAutorotateToInterfaceOrientation");
    return YES;
}

- (void)willAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
    NSLog(@"willAnimateFirstHalfOfRotationToInterfaceOrientation");
}

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration
{
    NSLog(@"willAnimateRotationToInterfaceOrientation");
}

- (void)willAnimateSecondHalfOfRotationFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation duration:(NSTimeInterval)duration
{
    NSLog(@"willAnimateSecondHalfOfRotationFromInterfaceOrientation");
}

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
    NSLog(@"willRotateToInterfaceOrientation");
}

Even if I return YES or NO into shouldAutorotateToInterfaceOrientation, no other log item is written into the console.

I don’t really mind this, but it’s a clue. My final wish is to avoid the image to rotate into its image view. How may I do that ?

Please consider into your answer that we are talking about a camera overlay, that could react in a different way than a normal view.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T07:41:33+00:00Added an answer on May 21, 2026 at 7:41 am

    You’ve got the right concept, but the wrong approach. The current device orientation does not affect how a UIImage behaves when placed inside of a UIImageView. If you want to modify this behavior, then you need to specify a UIImageOrientation on the image itself, like:

    UIImage* rotatedImage = [UIImage imageWithCGImage:myImage.CGImage scale:1.0 orientation:UIImageOrientationLeft];
    myImageView.image = rotatedImage;
    

    Note that you may not want to use UIImageOrientationLeft, that is just for example. You need to pick the orientation that will give you the end result you want based upon the orientation the picture was taken in and (maybe) the current device orientation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UITableViewController which has a UIView* called errorView that is used to
I have a UIView that gets added to my UITableView .view as a subview.
I have a CATiledLayer that is used to display a PDF page (this CATiledLayer
I have a UIScrollView which contains a sub-UIView, insetView which is used to display
Say that I have a UIView which I would like to re-use in multiple
I have a UIView class that I am using to have a CALayer. This
I have a parent UIView that has child UIView (UILabel used in the code
I have a variable, editForm, that is used as a pointer to a view
I have a UIView that I am rendering a UIBezierPath in based on touchesBegan
I have a UIView that has several UIImageViews as subviews. Each of these subviews

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.