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 843383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:07:03+00:00 2026-05-15T06:07:03+00:00

at initial UIImageView i have set it to mCurrentImageView.contentMode = UIViewContentModeLeft; so if the

  • 0

at initial UIImageView i have set it to

mCurrentImageView.contentMode = UIViewContentModeLeft;

so if the device rotate i will change contentMode
but it had no effect. how can i fix it?

if ([UIDevice currentDevice].orientation == UIInterfaceOrientationLandscapeLeft || [UIDevice currentDevice].orientation == UIInterfaceOrientationLandscapeRight) {
        mCurrentImageView.contentMode = UIViewContentModeScaleAspectFit;
    }
  • 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-15T06:07:04+00:00Added an answer on May 15, 2026 at 6:07 am

    [UIDevice orientation] does not return those identifiers for orientation. From the documentation, that message will return the following:

    typedef enum {
       UIDeviceOrientationUnknown,
       UIDeviceOrientationPortrait,
       UIDeviceOrientationPortraitUpsideDown,
       UIDeviceOrientationLandscapeLeft,
       UIDeviceOrientationLandscapeRight,
       UIDeviceOrientationFaceUp,
       UIDeviceOrientationFaceDown
    } UIDeviceOrientation;
    

    To change the content mode you should do something in the view controller code in the willRotate message:

    - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
        if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || toInterfaceOrientation == UIInterfaceOrientationLandscapeRight) {
            mCurrentImageView.contentMode = UIViewContentModeScaleAspectFit;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

You can set the initial size for an ArrayList by doing ArrayList<Integer> arr=new ArrayList<Integer>(10);
Initial data: have a paragraph of query which in the sake of reasoning can
Can you set the initial directory in Silverlight's SaveFileDialog? I'm not seeing it as
My initial task was to find a segmenter for Windows that will split a
Initial Warning : Long post and I might have got the pattern totally wrong
INITIAL QUESTION: I have an app that uses ExecutorService to run 4 fixedThreadPool. When
I am loading a initial set of 100+ sounds into the OpenAL buffer. After
I have an iPad application that has a base image UIImageView (in this case
I have an app i am building it works fine but the image source
Initial Question: A group of us (electronic engineering students - UK) have recently been

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.