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
1answer
91 views

Do we need Autolayout constraints for UIView & subviews added in UIScrollView iOS 6+

Whenever I want to use scroll view , I take UIView in IB & add my contents (label , text field , imageviews etc) on that UIView. Once done , I add UIView as subview to scroll view & set ...
0
votes
1answer
213 views

how to get auto layout to work in Xcode

I looked into http://developer.apple.com/library/ios/#recipes/xcode_help-interface_builder/articles/UnderstandingAutolayout.html but the explanations are pretty vague. I'm on iOS 6. I have a view ...
1
vote
1answer
282 views

UIStoryboard how to replace constraints programmatically?

I have a view controller laid out in a storyboard with autolayout enabled and am looking for a way to change constraints to allow for my view to rotate into landscape and rearrange buttons on the ...
0
votes
2answers
578 views

How to add UITableView just below NavigationBar using AutoLayout?

Using NSLayoutConstraint I can add the table view but in Landscape there is a gap between those , as I am giving constant 64 to its top.Is there any way to assign Navigation Bar's height to it? Any ...
0
votes
0answers
47 views

NSLayoutConstraint dependent on view orientation

I have a view that is to change size when the device gets rotated. Basically the view has the size of a banner advertisement. I am trying to describe the layout programmatically using ...
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
142 views

NSLayoutConstraint to hidden objects still overrides alternate constraint

I am just for the first time trying to use Autolayout in a nib. It would seem my case is textbook situation where the NSLayoutConstraints would be the perfect solution. I have a UITableviewCell with ...
1
vote
1answer
196 views

Should I use XIB or Storyboards at all?

I'm a pretty new iOS developer. I love AutoLayout and programmatic UI elements. The use of NSLayoutConstraints just makes so much sense to me, and the place it makes sense to adjust their values is in ...
2
votes
0answers
327 views

UIScrollView using pure auto layout not expanding right

I've read the official documentation from Apple on auto layout and UIScrollView: RN-iOSSDK-6_0 I'm trying the "Pure Auto Layout approach". I'm adding a UILabel and a UITextField. I want both to ...
0
votes
1answer
137 views

Local declaration of iOS 6 only pointers (e.g. NSLayoutConstraint)

I have an App which supports both iOS 5 and iOS 6. In one class I need to declare locally some NSLayoutConstraint pointers, which are iOS 6 only. I use them just for the iOS 6 layout, because for iOS ...
4
votes
2answers
389 views

Two views, one below another in portrait and side by side in landscape using layout constraints

Suppose I have two Text View. In portrait mode, I want these one below another & In landscape mode, I want these to be side by side Is it possible to do that using layout constraints in ...
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 ...
3
votes
2answers
153 views

Autolayout Constraint Error with a single constraint

I have a scence with a bunch of labels and buttons. When you tap on a button a view slides up from the bottom with controls in it, a kind of keyboard so to say. It "looks" like this: ...
2
votes
1answer
265 views

Will apple reject my app on autolayout warnings?

I made iPhone app targeting iOS 6 My app runs very smoothly and there is no crash in the app during launch and anywhere in the app.. but my app shows some warnings related to autolayout. I tried a ...
0
votes
1answer
178 views

Animating a view created in IB using Autolayout

I have a view with a lot of labels and buttons which are created on code because in IB is too complicated. This works ok. In IB I also created an input view which I want to appear from the bottom by ...
2
votes
1answer
308 views

How to animate a NSLayoutConstraint within a CAAnimationGroup

I had for example this in pre-autolayout times which was added to a CAAnimationGroup. CABasicAnimation *resizeAnimation = [CABasicAnimation animationWithKeyPath:@"bounds.size"]; [resizeAnimation ...
0
votes
1answer
118 views

iOS 6 Auto Layout Constraints Error: “Something is nil”

I am trying to use constrains in iOS 6 and want to align a label to another. One label and the constrain are created dynamically on a tap on a button. This is a very simple example but i get a wired ...
1
vote
1answer
365 views

UITextView Alternative

As i understood from Apple docs attributedText property of UITextView: This property is nil by default. Assigning a new value to this property also replaces the value of the text property with the ...
2
votes
2answers
745 views

UIScrollView setContentSize with subviews also laid out using constraints

Suppose i have the following implementation: UIPageViewController UIScrollView called mainScrollView added as subview to the UIPageViewController.view [UIScrollView ...
0
votes
1answer
886 views

how to invalidate uiview constraints

I would like to invalidate a uiview constraints from code to force all fields to relayout based on a specific change in the view. For example, suppose i have two UILabels that are given a fixed ...
1
vote
2answers
727 views

Why is NSLayoutAttributeCenterX an 'Invalid pairing' with NSLayoutAttributeWidth

I am trying to have the auto layout manager adjust the center point of a view, based on the width of the super view. I don't understand why that is an 'Invalid Pairing' of the attributes (as told by ...
0
votes
0answers
349 views

iOS constraint weird behavior

I have a chart displayed using UIView with the following constraints applied: |-[chart1]-[chart2]-| above the views I have a label to tell the value of each columns, so I aligned the bottom of the ...
0
votes
1answer
2k views

How to center a button with a custom width using autolayout constraints?

Please see the following code: def viewDidLoad super self.view.translatesAutoresizingMaskIntoConstraints = false self.view.backgroundColor = UIColor.whiteColor @start = ...
1
vote
1answer
181 views

Page application + Autolayout + Subviews scale while scrolling

I've been working on a controller for 4 days and i can't fix my problems! Let met explain my architecture : I have a "Rootview", wich contains a ScrollView and anImageView (Both of them added in IB) ...
5
votes
2answers
4k views

Autolayout programmatically on a subview of a subclassed UIView

I have subclassed UIView to make a custom groupView I use to add a few things to my layout in a simple way. This groupView includes a UILabel which is used as a heading and a UIView that draws a ...
10
votes
2answers
6k views

App crash on iOS 5 - Could not instantiate class named NSLayoutConstraint

My app is working very fine on iPhone and Simulator with iOS 6, but when i try to run on iPhone/Simulator with iOS 5 the app crashes The error is: Terminating app due to uncaught exception ...
8
votes
3answers
6k views

AutoLayout to keep view sizes proportional

I'm trying to achieve the following: I have 2 views in my xib that need to stay 20 pixels off the edge (both sides and top) The 2 views that need to resize aren't the same size They have to be 20 ...
1
vote
2answers
4k views

How to use NSLayoutConstraint in iOS 6?

My app should support both iPhone resolutions (5 and older) using iOS 5 and iOS 6. When I use autolayouts in IB, on iOS 5 app crashes like this: link So, I am trying to use NSLayoutConstraint in ...