1
vote
2answers
41 views

How to use AutoLayout to position UIButtons in horizontal lines?

I need to create a couple of UIButtons with various widths programmatically in my app (iOS 6.0 and above). I want to display the buttons in a "wrap around" style: Starting from the left edge, each ...
1
vote
1answer
36 views

Add a number of buttons to view with X,Y,padding constraints using autolayout programatically

Let say I have a N numbers of buttons.. //---listOfServicesToDisplay is DYNAMIC NSMutableArray * arrayOfButtons = [NSMutableArray array]; for (int i=0; i<[listOfServicesToDisplay count]; i++) { ...
0
votes
0answers
22 views

Constraints not working in UITableViewCell

I have a UITableViewCell using a Segmented Control. When I rotate the display, the control rotates off-screen. I thought I could fix this by constraining the right edge of the control to the right ...
0
votes
2answers
51 views

Get same result with NSLayoutConstraint as with Autosizing

In my UI I have 5 buttons at the bottom. With autosizing applied to every button like on the picutre: I get desired results: However, when I tried to do it with Autolayout in IB or in code like ...
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 ...
3
votes
1answer
2k views

Where is the XCode checkbox “Translates Autoresizing Mask Into Constraints”

This post may well get lost in the WWDC 2013 chatter, but it's more to do with my confusion over one of last year's features...autolayout. In one of the WWDC 2012 videos, Auto Layout By Example, the ...
0
votes
2answers
89 views

How to edit/modify NSLayoutConstraint in Xcode?

I drag a tab view into my custom view, and set its frame. Xcode automatically generate several NSLayoutConstraint objects those will decide its frame during auto-layout. As shown above, a ...
0
votes
0answers
101 views

NSLayoutConstraints break upon view is rotated from unsupported to supported orientation

I have a modal view which works fine in both landscape and portrait modes (no debugger constraint issues). Now, since I want the view to be always presented in portait, I've implemented ...
0
votes
1answer
179 views

Set fixed space between 2 views in Interface Builder

I am trying to learn to use layout constraints in interface builder but I am running across an issue... I've got two views, one UILabel and one UIImageView, and I'd like a layout as follows: the ...
7
votes
2answers
7k views

How do I create a constraints based view that resizes between iPhone 5 and iPhone 4 comparable to Anchor operation?

The sort of classic Springs and Struts, aka "Anchor and Align", or "Autosizing masks" is the only sort of resize-management I understand. However in XCode 4.6, "autolayout" using constraints as ...
0
votes
1answer
926 views

How to animate setFrame: with auto layout in Objective-C

I'm working on an iOS (6) app, and I have a view, whose size I change (animated), and within that view is a UILabel, which I want to grow with the view, but not proportionally. i.e. I need the view ...
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: ...
0
votes
1answer
198 views

CGRectMake Revert back to original position?

Im moving a UIView from its original position as laid out on my XIB/Storyboard using the following: -(void)myMovingViewAction{ [UIView animateWithDuration:.15 animations:^{ ...
16
votes
1answer
5k views

Add constraint not listed in Editor menu in Xcode

I am trying to add layout constraints to my NIB, and i am following the directions apple provides here: ...
0
votes
1answer
272 views

NSLayoutConstraint SIGABRT on iPad

Application is made in Interface builder. Seperate storyboards for iPhone and iPad. Project runs and works properly on iPhone Simulator, iPad Simulator, iPhone 4 with newest iOs, but I get this error ...
4
votes
1answer
6k views

NSLayoutConstraints and setting the width/height of a view dynamically

I have a question about setting the size of a view to which i'm applying some layout constraints. How can I define the size of the view without defining its frame? I'm trying to create a view that ...
14
votes
3answers
11k views

Unable to simultaneously satisfy constraints, will attempt to recover by breaking constraint

Below is the error message I receive in the debug area. It runs fine and nothing is wrong except that I receive this error. Would this prevent apple accepting the app? How do I fix it? 2012-07-26 ...