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

  • Home
  • SEARCH
  • 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 6528797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:34:06+00:00 2026-05-25T09:34:06+00:00

After reading about UIView ‘s autoresizingMask on SO and developer.apple.com I’m still unclear what

  • 0

After reading about UIView‘s autoresizingMask on SO and developer.apple.com I’m still unclear what the purpose is. What’s a situation where setting this property is necessary?

  • 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-25T09:34:06+00:00Added an answer on May 25, 2026 at 9:34 am

    Yes, it is often necessary to set it if you don’t want to resize the views manually. Note that it is mostly useful for subviews (i.e. those views that don’t take the whole screen) rather then the main view of your app.

    Views typically may need resizing if:

    • the device is rotated
    • an extra view (say, an ad) is added to the view, so the existing subviews have less available space.

    For example, suppose if you have a view with two buttons on it, one in the top-left corner, another in the top-right corner. In order for the buttons to get wider when the view transitions from portrait to landscape, you need to set the FlexibleLeftMargin to the right button, FlexibleRightMargin to the left button.

    Edit: autoresizingMask is also the first thing to look at if you see weird holes or overlaps when device is rotated or a new subview is added. Quite often the proper setting of these masks for subviews can get you a nice looking view in both orientations without having to lay out subviews manually – but usually it takes some experimenting.

    Edit2: (since this is still gathering upvotes) Autoresizing masks are now mostly superseded with “Auto Layout”, which allows for much more flexible constraints on views’ sizes and positions. That being said, translatesAutoresizingMaskIntoConstraints is still occasionally useful for dynamically added views.

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

Sidebar

Related Questions

After reading about Mr. Honan's digital life being destroyed: http://www.wired.com/gadgetlab/2012/08/apple-amazon-mat-honan-hacking/all/ , I started thinking
After reading http://www.w3schools.com/tags/tag_noscript.asp confused about onclick event on noscript tag. Anybody knows the purpose?
After reading about CCR : http://www.infoq.com/news/2008/12/CCR I get the impression that it does pretty
After reading about the GAE Datastore API, I am still unsure if I need
After reading about the problem of passing empty std::string objects between DLLs and EXEs,
After reading a description about swapping pointer addresses on Stackoverflow, I have a question
After reading an article about fonts, i tried the code and i am getting
After reading some articles about XSS I have incorporated HTMLPurifier into my zend framework
Im skinning a progressBar in Flex, and after reading a bit about it, I
I have a few questions about this after reading the iPhone documentation on it:

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.