1
vote
2answers
39 views

UILabel Autolayout width trouble

So I'm trying to use autolayout for cell content view to get the proper layout. So my problem is that I have a UILabel that changes its size with respect to its text and I also have a UIView as a ...
0
votes
2answers
38 views

How do I position a UIView at the centre of two other UIViews with Auto Layout?

I have a UIView in the middle of two other UIViews. Say they're called "Top", "Middle", and "Bottom". "Top" and "Bottom" are both position 20pt from the top and bottom respectively. How do I position ...
0
votes
0answers
50 views

UIView animation issues with autolayout and constraints

I'm developing an app which has a feature allowing the user to select an image from their photo library and attach a caption to it, for display in a UICollectionView. I'm using storyboards and ...
1
vote
1answer
60 views

With iOS 7's view controllers being full screen, is it possible to set a constraint to the very top of the view, not just the nav bar?

When I align a UILabel to the top, my option is superview but it always uses the nav bar as the reference point. This causes problems when I hide the navigation bar and the constraint adjusts to the ...
0
votes
0answers
14 views

reseting an view's constraint

So I added a constraint to a imageView [NSLayoutConstraint constraintWithItem:imageView attribute:NSLayoutAttributeLeft attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual ...
0
votes
0answers
7 views

-[NSLayoutConstraint shouldBeArchived]?

How do I know what to set -[NSLayoutConstraint shouldBeArchived] to? When would a UIView be archived?
0
votes
1answer
53 views

How do I shift two UIViews 270px to the right in AutoLayout in code?

I have a UIView that is offscreen 400 pixels to the left and is 280 pixels wide. I'm trying to shift the main UIView to the right 280 pixels and to have the offscreen UIView move onscreen to the ...
7
votes
1answer
155 views

How do I move a label and animate the change using Auto Layout?

I'm trying to move a UILabel to the left and animate the movement. The UILabel is created from a storyboard, and has the following constraints: But if I try to make the trailing space constant ...
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 ...
1
vote
1answer
104 views

Animating NSLayoutConstraints changes (and the objects that have constraints to the changed one)

I have an UIImageView object which is goes on and off screen at the touch of a UIButton, and I'm doing that by changing it's NSLayoutConstraints. I have successfully animated that 'movement' using the ...
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?
2
votes
3answers
86 views

How do I make a constraint to position my label from the top, but not have it move when I hide the navigation bar (as it adjusts height of view)?

Long story short, I want to position my UILabel so that it's, say, 150pt from the top of the screen. This allows it to be a good distance from the top on both a 4" iOS device or a 3.5" iOS device. ...
0
votes
1answer
32 views

Toggling Auto Layout constraints - possible?

Is it possible to toggle Auto Layout constraints, so one can be enabled under certain circumstances, but that one can be disabled and another can be enabled under a different circumstance?
3
votes
0answers
122 views

FlyoutNavigation - Views using NSLayoutConstraints Fail to Properly Draw View on First Use

Cross-posted here and on github, https://github.com/Clancey/FlyoutNavigation/issues/29. I have an odd behavior I'm trying to track down, and I'm not sure if it is FlyoutNavigation or something else ...
0
votes
1answer
193 views

I have a UILabel positioned on the screen with autolayout, but when I hide the navigation bar it causes the label to “twitch” for a second [duplicate]

Project: http://cl.ly/1T2K0V3w1P21 It's best seen through the project, it's a small download stripped down to just the view controller. Basically, my UILabel stays in place perfectly with auto ...
0
votes
1answer
158 views

Why when I made my constraint relative to the superview's bottom did it operate from the superview's top? And is it now right?

I have the following code: self.noArticlesView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, self.view.frame.size.height)]; UIImage *backgroundPattern = [UIImage ...
0
votes
1answer
332 views

Why do i need to call layoutIfNeeded when using autolayout

I have custom UITableViewCell, inside the cell i have simple UIView , when i'm trying to get that View frame i got the 0 height and width.But when i call [self layoutIfNeeded] inside awakeFromNib ...
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 ...
1
vote
2answers
252 views

UIScrollView with dynamic number of views and Auto Layout iOS6

i am struggling with an UIScrollView in iOS6 using auto layout. What i am trying to do is setting up a scrollview holding a number of subviews (UIViews). Those subviews are created dynamically in a ...
0
votes
1answer
210 views

Dynamic uiview layout with auto layout

I'm working with autolayout and its been going very well so far but right now I am at lost as to the way to proceed to achieve the design I want. I got a a small questionnaire with 2 sections. Each ...
0
votes
1answer
625 views

Evenly Space UIViews of equal sizes in superview using Auto Layout in iOS 6

I am in a need of having the series of buttons to be evenly placed in superview Horizontally using Auto Layout. Here, I want to keep the sizes of the subviews same, only the center of the subviews ...
0
votes
0answers
129 views

Objective C - Constraint Errors When Fixing Subview Size to Superview

Apologies for the length of this question, but it's a hard one to express. I'm attempting to create a generic UIView subclass which acts as an overlay, filling whatever superview is given. This ...
0
votes
0answers
54 views

is there a standard recipe for: Creating a 'WidgetView' subclass of UIView that behaves nicely with NSLayoutConstraints and AutoLayout

Is there a standard recipe for creating UIView subclasses with NSLayoutConstraints using XIBs all I want is to design custom UIView that holds a few labels (weekday, date and month). The visual ...
1
vote
1answer
934 views

UIView Element Layout Constraints

I'm fairly new to iOS development but have reached the point where I want to create my own composite UIView as a custom UIButton. I would like to layout a UILabel and 2x UIImageViews as follows; ...
0
votes
1answer
414 views

UIView subview auto resizing

I wrote a little UIView subclass to show a progress HUD. That HUD view works perfect but I faced a little problem in the last days. In my application I'm presenting a UIViewController in a custom ...
12
votes
2answers
7k views

iOS: How does one animate to new autolayout constraint (height)

I've never worked with autolayout constraints before. I have a small new app I'm working on and noticed that the NIB's views are defaulting to autolayout. So, I figured I'd take the opportunity to ...