Auto Layout is a constraint-based, descriptive layout system for OS X and iOS development.

learn more… | top users | synonyms

0
votes
1answer
8 views

Is it possible to create NSLayoutContraints for a view created in Interface Builder?

I'm learning webdev with meteor and I'd like to use Google Webfonts for my web app. In a test app, I have a UIImageView that I placed randomly in the ViewController's view via IB. Then in the ...
0
votes
1answer
16 views

UILabel text not automatically resized using Auto Layout

I'm trying to implement a constrained UITableViewCell subclass and everything is working perfectly, except for the UILabel. The constraints that I've set up are definitely being enforced, but the text ...
0
votes
0answers
6 views

How can I animate NSSplitView collapse with auto layout

I have an interface designed as below set up with auto layout in the XIB. [Left Pane]-[Center Pane]-[Right Pane] [ Bottom Pane ] Currently it supports max and min ...
0
votes
2answers
41 views

Autolayout how to get computed value from view

There is one thing that is really making me crazy about auto layout , I'm doing my tests and found that if you subclass a UIView and you put some views with their constraints is impossible to know the ...
0
votes
0answers
36 views

Automatic Height Sizing when UIToolbar shows up

I've got a UIView with a UITableView and a UIToolbar as subviews. The tableview occupies the whole space and the toolbar is hidden. When the user selects cells in edit mode the toolbar animates up and ...
0
votes
2answers
36 views

Resize current view using NSLayoutConstraints

I'm trying to set the layout of a view using NSLayoutConstraints. I can set things up within the view correctly, but I also need to be able to resize the current view (the one that I'm setting the ...
0
votes
0answers
18 views

Issues with AutoLayout with Custom Views defined in NIB file and used in StoryBoard

I've defined a custom view in a NIB file and would like to instantiate a copy in a StoryBoard but I'm having issues with autolayout. In a simple example, the custom view has single label with a fixed ...
0
votes
1answer
35 views

AutoLayout not pinning subview to superview

I'm trying to pin a subview inside of a custom UITableViewCell class to the left side of the cell's contentView. I'm adding the subview to the contentView inside of the initWithStyle method of the ...
0
votes
0answers
9 views

Change autolayout contraints on uiview in a uiciollectionViewCell when orientation changes

I'm using a UICollectionView with a Custom UICollectionViewCell The custom cell has 1 cell per row in portrait and 2 cells per row across in landscape Everything is using autolayout. I have one a ...
0
votes
0answers
37 views

Autolayout in UIView where is safe to ask computed layout values?

I've got this issue. I'm using a collection view as a subview of the main view of a UIViewController. The collection view is pinned to the superview size, thus it has 4 constraints for lead,trail, top ...
0
votes
1answer
21 views

Autolayout height equal to MAX(multiple view heights)

Say I have a view called container. container contains 5 UIButtons. I want to add a height NSLayoutConstraint on container, and this height should be equal to the NSLayoutHeightAttribute of the ...
0
votes
1answer
10 views

issue with constraints in autolayout and SMPageControl

Here is an error from my console concerning my auto layouts of some view components I have a view, with two subviews, a swipe view and an SMPageControl view. Here are the constraint errors when I try ...
0
votes
1answer
29 views

Using AutoLayout, how do I keep a UILabel in the same place when the navigation bar disappears?

I have a view controller with a UILabel in it that prints some words when a button is tapped. When the button is tapped, the navigation bar is set to hidden. So I tried taking the UILabel and giving ...
0
votes
0answers
13 views

Autolayout (greater then or equal) option still create constraint (equal)

I created a container (UIView *) in my view controller's view using the story board and I set the container height constraint to be grater then or equal but after that I get two constraints, one that ...
0
votes
1answer
32 views

iOS rotation makes views move off screen

I have a iPhone app that supports both portait and landscape orientations. When I rotate one of the views for the first time all of the subviews move to the left until they are half way off the ...
2
votes
1answer
21 views

Is there a best practice for using instance variables with NSLayoutConstraint's Visual Format?

Let's say I have an instance variable from a superclass named label, and I want to set auto layout constraints using the visual format. If I try to use self.label in the format string, I get parse ...
1
vote
1answer
57 views

iOS Autolayout Vertically equal space to fill parent view

I have view controller with 12 UITextFields. It is very well fit in 3.5 display. I need to set it for iPhone 5 (4 Inch display) such that all UITextField cover hole UIView by adding extra space in ...
0
votes
1answer
21 views

xcode 4.6 autolayout doesn't right align view to scrollview

I'm using iOS 6 auto layout. I have the portrait mode created with Interface Builder. I have a UIScrollView inside the UIView (Controller class view). I set two labels: one is right aligned to the ...
0
votes
1answer
20 views

UIImageView and Auto Layout in Code

I'm trying to use programmatic visual constraints to display a label and a button next to one another. However, the UIImageView used as the button's background is making the intrinsic size of the ...
0
votes
1answer
31 views

With AutoLayout, I want an 8px high view to stick to the bottom of its superview

I have a UIView acting as a progress bar that sites at the bottom of the screen. I can't seem to figure out how to use AutoLayout to have it stick to the bottom of the screen and remain 8px high. Is ...
1
vote
1answer
36 views

get warning for autolayout, NSAutoLayout,objective C

My goal : to center an indicator ( vertically and horizontally ) to the button in a view What I am doing is : [self.logInButton addConstraint:[NSLayoutConstraint constraintWithItem:spinner1 ...
0
votes
0answers
23 views

NSLayoutConstraint between Navigation Bar & ViewControllers View

Can we add a NSLayoutConstraint between self.navigationcontroller.navigationbar and a view inside the self.view. Here self is a UIViewController instance and _textField is a subview of self.view What ...
1
vote
0answers
38 views

iOS Scroll View, Container View - auto layout issue

I'm using storyboards & auto layout. I have a Container View in a UIScrollView. The Container View allows me to layout a long (320, 1000) view in the storyboard. I set the content size of the ...
1
vote
0answers
22 views

How to change default UIButton padding when using auto-layout

When using auto-layout in iOS 6, a UIButton's intrinsic content size appears to include about 10px of padding around the button text. Is there any way to control this padding value? For example, I'd ...
0
votes
0answers
8 views

iPhone UIStoryboard view frame has all zero values during initWithFrame:

I started to work with a storyboard that uses autolayouts and am running into an issue where during initialization of some of my controllers the frames of these controllers have all 0 values: ...
0
votes
0answers
23 views

Using a UIPageViewController view.size.height is wrong

I'm using a UIPageViewController to display a photo gallery type app. One photo per page with swiping between each. When the UIPageViewController first appears (i.e. from tapping a photo in the ...
0
votes
3answers
30 views

Resize TextView for 4" display?

How do I resize a text view so that it expands when displayed in the new 4" screens that it isn't shorter? I'm using AutoLayout. Also, I calculated that since the iOS keyboard takes up 216 points on ...
0
votes
1answer
24 views

AutoLayout conflict errors

I'm getting some conflict errors for my AutoLayout setup in the console. I know what they mean. How can I find which views the errors are referring to? I know I saw a WWDC video where the guy set ...
0
votes
1answer
63 views

Xcode Autolayout: Place a label next to a dynamic label at a constant distance

Check out the loading date label. It could be '2 May' or '24 December'. I want to display the label 'days remaining' after it. Since the width of 'loading date' is dynamic, via auto layout I ...
0
votes
1answer
31 views

UITextView that expands dynamically to text inside a scroll view using auto layout

I have a UIScrollView that includes some components, and one of these components is a UITextView, what I want is to let the UITextView dynamically expands with the UIScrollView, in fact I use ...

1 2 3 4 5 22
15 30 50 per page