2
votes
1answer
120 views

Auto Layout: why do conflicting required hugging priorities & fixed-width constraints not throw an exception?

I have the following setup: A custom subclass of UIView that defines a fixed intrinsicContentSize of (50,50) An instance of this view as the only subview of a new app's window Horizontal and ...
0
votes
0answers
37 views

Where to add a layout constraint with a mutable constant

I have a scroll view containing a single large view, contentView. The size of this view is informing the scroll view's content size via autolayout. When I set up the contentView in viewDidLoad, I set ...
0
votes
1answer
52 views

Does it matter which superview I add constraints to?

Let say I have 3 views A|----------| | B|-----| | | | C ▢ | | | |_____| | |__________| If I have a constraint involving view B and view C. The documentation suggests adding to ...
0
votes
1answer
61 views

Resize a view when another is hidden

I have two views on the iPhone screen, one above the other (mediaControls above deviceWebView). When I hide the top view I want the bottom view to take up the entire screen, and when I reveal the top ...
0
votes
2answers
75 views

Equally distribute spacing using Auto Layout visual format string

Is it possible to equally distribute left and right space for b in @"|-[a(5)]-[b(8)]-[c(5)]-|" using visual format strings?
1
vote
0answers
166 views

Determine NEW Frame of Navigation Bar BEFORE actually rotating - iOS

I am using a a translucent Navigation Bar and Status Bar and my View Controller wants full screen. Thus, my View Controller's View extends under the Nav and Status bars and takes the full size of the ...
0
votes
0answers
125 views

How to make autolayout change frame size to maintain constraints on rotation?

I have a UIView with very simple constraints, as the root view on a UIViewController: This view has a single subview with all my UI elements in that subview. Both views have ...
0
votes
1answer
76 views

Is it possible to get the calculated frame given an array of constraints?

I'm trying to animate a view from a thumbnail to a fullscreen view when touched. When the view is in thumbnail mode it is a subview of the UITableView.tableFooterView. When I animate to fullscreen I ...
2
votes
1answer
418 views

How to get NSLayoutConstraint programatically between UIButtons?

In a view I'm inserting a new UIButton, As I have been using AutoLayout, I need to get constraint of the view below which I'm going to insert button. How do I get the NSLayoutConstraint ...
5
votes
1answer
145 views

Animate intrinsicContentSize changes

I have a UIView subclass that draws a circle whose radius changes (with nice bouncy animations). The view is deciding the size of the circle. I want this UIView subclass to change its frame size to ...
2
votes
0answers
152 views

Black screen after setting translatesAutoresizingMaskIntoConstraints to NO

I have a Scrollview with a a label. To center the label in the top center, I apply two constraints to it: [self addConstraints:[NSLayoutConstraint ...
1
vote
1answer
275 views

Can I use NSLayoutConstraints to keep a UIView's subviews equally spaced regardless of later adding or removing from the subviews array?

I'd like to have a UIView where, every time I add or remove subviews from its subviews array, whichever subviews happent to be in the array are still equally spaced. For example, if I have subviews a ...
0
votes
1answer
254 views

NSLayoutConstraint - dynamic height of a superview

I have three views inside a custom UITableViewCell: self.username, self.postText, self.containerView where self.containerView is the superview for the two others. I want it to be layed out like this: ...
1
vote
1answer
124 views

DIsplay a view in front of a UITableView with Auto Layout

Below is what I am setting up for my view. There is a mask (UIView) with bottom space to superview of 0. When I am displaying on the simulator (iphone-retina 4) or on a device(iphone 5) ,the mask is ...
2
votes
1answer
605 views

NSLayoutConstraint and dynamic UITableViewCell height

How to write (or do in IB) layout constraints for dynamic tableViewCell height? For example if there is textView (sized to fit) in contenView of cell and I want to cell to be as high as label.