Cocoa Touch bit-field mask for determining the behavior of UIView objects relative to their parent views when the parent view is resized.
Questions tagged [autoresizingmask]
257 questions
217
votes
4 answers
Autoresizing masks programmatically vs Interface Builder / xib / nib
I was in an (probably false) assumption that enabling the right margin indicator in xib is equivalent to using UIViewAutoresizingFlexibleLeftMargin inside code and so on.
So, I used to think according to this snapshot:
Later today I had to cross…

Raj Pawan Gumdal
- 7,390
- 10
- 60
- 92
71
votes
11 answers
Unable to simultaneously satisfy constraints - No constraints in place
I have gone through and removed every single user constraint yet I am still getting the following error ONLY after I rotate the device. I have absolutely no clue why though. Does anyone have any ideas?
2013-01-14 21:30:31.363 myApp[35869:c07] Unable…
user843337
65
votes
2 answers
How to use UIView autoresizingMask property programmatically?
I've laid out some subviews with Interface Builder, but I'd like to do it in code instead.
I've read the UIView docs about setting the view.autoresizingMask property. I'm looking for a logical explanation of how to translate the struts and springs…

MattyG
- 8,449
- 6
- 44
- 48
59
votes
5 answers
Set UIView's autoresizing mask programmatically?
I have to set autoresizingMask programmatically for UIView.
I don't know how to implement this.

Hiren
- 12,720
- 7
- 52
- 72
37
votes
2 answers
xcode/iOS: Autoresize to fill a view - explicit frame size is essential?
I would like a UITextView to fill its superView, which is a plain UIView inside a UIViewController instance.
It seems that I cannot make the UITextView do this solely by using the API-specified properties of autoresizingMask and autoresizesSubviews.…

KomodoDave
- 7,239
- 10
- 60
- 92
25
votes
2 answers
What is the purpose of UIView's autoresizingMask?
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?

SundayMonday
- 19,147
- 29
- 100
- 154
24
votes
7 answers
iOS 7 Custom UINavigationBar TitleView moves when Pushing or Popping new View Controller
I am using a custom title view for a UINavigationBar with the following code:
// Set a label to the nav bar
THLabel *titleLabel = [[THLabel alloc] init];
titleLabel.text = @"Test";
titleLabel.font = [UIFont fontWithName:APP_FONT…

PhilBot
- 748
- 18
- 85
- 173
24
votes
3 answers
iOS Autolayout and UIToolbar/UIBarButtonItems
I have an iOS view with autolayout enabled and have a UIToolbar with a UISearchBar and UISegmentControl contained with the toolbar. I want the UISearchBar to have a flexible width so I need to add a constraint to force this, but from what I can…

outerstorm
- 712
- 3
- 7
- 16
22
votes
9 answers
NSSplitView and autolayout
How should I use auto layout constrains inside NSSplitView subview?
My NSSplitView subview has 3 subview: topPane, tableContainer and bottomPane and I set the constrains like this:
NSDictionary* views = NSDictionaryOfVariableBindings(topPane,…

Dmitry
- 7,300
- 6
- 32
- 55
20
votes
3 answers
Problem setting autosizing in interface builder
I have two viewControllers, one is a subclass of UIViewController (autoresizes correctly), the other one is a subclass of a subclass of UIViewController.
I did a layout in Interface Builder, I tested my code in the Simulator and everything works as…

Matthias Bauch
- 89,811
- 20
- 225
- 247
20
votes
3 answers
Auto resizing issue in UITableView in Xcode 6
I am using auto resizing in xcode 6 in UITableview but it is not working properly. I want to use autoresizing.I have added textfield in static cell in UITableviewController class from storyboard. Textfield beyond the screen either in landscape or…
user3150919
20
votes
7 answers
Unable to handle orientation in iOS 6?
I am using
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
delegate to change the frame of my view based on the orientation type
i.e.,
if(UIInterfaceOrientationIsLandscape(interfaceOrientation))
{
…

Bharath
- 3,001
- 6
- 32
- 65
19
votes
2 answers
how can i increase the height of an inputAccessoryView
I have spent several days on this with no solution in sight.
I have an inputAccessoryView which consists of a UIView containing a textView and two buttons. The behaviour of the inputAccessoryView is as expected and works fine in all cases except…

alionthego
- 8,508
- 9
- 52
- 125
16
votes
3 answers
Proper AutoresizingMask
I have a view that appears at the center of its parent view portrait mode, what autoresizemask should I use so that it appears in the center in landscape mode too. It's size should remain same.I just want its origin should shift themselves…

Vishal Singh
- 4,400
- 4
- 27
- 43
14
votes
2 answers
iOS6 iPhone 5 nothing clickable at bottom of screen
I have an app I am trying to convert and make ready for the new iPhone 5 screen size. I added the new Default-568h@2x image and I set my views to autosize in IB. The views look right, they stretch to fill the screen, but any button I put at the…

user1689158
- 169
- 5