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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:38:47+00:00 2026-06-18T15:38:47+00:00

I am programmatically creating a UIView which will eventually become a help speech bubble

  • 0

I am programmatically creating a UIView which will eventually become a help speech bubble for my universal app but I am having difficulty in getting the UIView to support device rotations. When my view is created it looks great, just how I want it but when I rotate the device then my UIView popover expands to fill the entire screen which is not what I want.

I am using iOS 6 with Auto Layout for the other storyboard controls if that helps.

Could somebody please explain why iOS resizes my popover to full screen on device rotation?

I also looked at adding some constraints to it but thought that was more for the sub layers rather than the popover view itself.

The code I am using is:

customView = [[UIView alloc] initWithFrame:CGRectMake(20, 20, 200, 200)];

customView.layer.cornerRadius = 15;
customView.layer.borderWidth = 1.5f;
customView.backgroundColor = [UIColor blackColor];
[customView setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];

[self.tableView.superview addSubview:customView];
  • 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-06-18T15:38:48+00:00Added an answer on June 18, 2026 at 3:38 pm
    [customView setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];
    

    Flexiblewidth/height autoresizing mask resizes your UIView when the parent view changes. When the view is rotated, your superview’s frame is changed and the view will change width and height proportionally. If you want the same size, remove that line, if you want the same padding around your view use

     [customView setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleBottomMargin];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a scrollview in which i am creating buttons programmatically. On touch, button
I am creating a view controller programmatically which is a UITabBarDelegate and contains a
I am bit stack with creating two UIViews which are switchable (each UIView has
I am programmatically creating an Ellipse shape but I can't find any property that
In my iphone app i am programmatically creating the labels ,,i am creating array
I am creating tableView programmatically i want to set tableView style group but how
I'm programmatically creating javascript files from a .NET web app and would like to
I am programmatically creating a CALayer subclass which applies a bit of pixel noise
In my view controller I'm programmatically creating N buttons in my UIView . Each
I am creating a UIImage programmatically in my UIView's drawRect function. Is there a

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.