Questions tagged [ios-autolayout]

In iOS, Auto Layout dynamically calculates the size and position of all the views in your view hierarchy, based on constraints placed on those views.

In iOS, Auto Layout dynamically calculates the size and position of all the views in your view hierarchy, based on constraints placed on those views.

More info

1049 questions
2
votes
2 answers

Updating auto layout constraints to reposition Text Field

I am currently working my way through the Udacity iOS Development Nanaodegree and have come up against a problem that I am really struggling to solve. I am new to development, and Stackoverflow, so this is my first post.... here it goes; I am…
2
votes
2 answers

Sibling of animated UIView goes immediately to Final position

I have 3 UIViews displayed using AutoLayout. UILabel UIView for browsing a calendar. This view is a custom UIView containing a UIView which is in turn containing two UIButtons and a couple of UILabels UiTableView of Appointments View 2 has a…
Pat Long - Munkii Yebee
  • 3,592
  • 2
  • 34
  • 68
2
votes
3 answers

Adding multiple UILabels in view with constant height between them

I am trying to add some 5-6 UILabel's (Single line only) in a UIView using auto layouts. I have added constraints for top most & bottom most UILabel. The problem is variable screen sizes. Just wants to know a better approach of adding those remaing…
JiteshW
  • 2,195
  • 4
  • 32
  • 61
2
votes
2 answers

buttons disappear on rotation

I'm reworking an existing project to allow for screen rotation and multiple devices but whenever I rotate the screen in the simulator, the buttons disappear. A started from scratch toy example works but not the active project. What things could…
drw
  • 943
  • 1
  • 10
  • 25
2
votes
2 answers

UIPageViewController - view was not at the correct position initially

I am using UIPageViewController to create the introduction pages of my app. As the gif(I swiped to the 2nd view and swiped back to the 1st view): My second page's view was not at the correct position initially. It's upper than it should be and…
Brian
  • 30,156
  • 15
  • 86
  • 87
2
votes
3 answers

Why do I receive an error that says 'Unable to simultaneously satisfy constraints.' for auto layout?

I am trying to pin a button on all 4 sides to fix a button object at the exact location that I arbitrarily placed it at, but I am getting the following error when I run it. Any insight or help would be really appreciated. Unable to simultaneously…
Ko Ki
  • 43
  • 1
  • 5
2
votes
1 answer

Autolayout issues when adding a new view into a hierarchy

I'm struggling big time with a couple of scenarios when i have a UIView with constraints applied via IB and adding a new UIView into it's view hierarchy. Here's how it goes: I have a full screen UITableView with the following constraints applied so…
dusker
  • 846
  • 2
  • 8
  • 13
2
votes
2 answers

Why does autolayout have issues with this layout

I'm having some issues with Autolayout width on all screen sizes for a keyboard extension. At first it worked fine, but then suddenly started spitting out a number of errors regardless of the width of the screen. I didn't change anything, I even…
Aleksander
  • 2,735
  • 5
  • 34
  • 57
2
votes
2 answers

Autolayout constraint issue when device orientation gets changed

I am facing an issue in auto layout. I want two buttons as shown in screenshot. I want them to show correctly in landscape mode also. 1) Buttons should be centre align horizontly. 2) Buttons should have equal width and height. 3) Button should have…
user1101733
  • 258
  • 2
  • 14
2
votes
2 answers

How to set multiple UIlabel in same line for all iphone devices

I am setting constraints for 4 UILabels but its not working properly in iphone 5s and it's showing properly in 6 and 6 plus. How to set proper constraints? its going right side in iphone 5s. First label, I have set x position and then space…
user4238267
2
votes
2 answers

Shadows Persist in UITableView after reloadSections:

Due to our designer being a sadist, I have a UITableView with a segmented control that switches between two different types of cells in separate feeds. The cells are dequeued with different identifiers and classes — this all works fine. The cells…
Alex Popov
  • 2,509
  • 1
  • 19
  • 30
2
votes
2 answers

Can I do this with autolayout/size classes?

Can I do this with autolayout and size-classes in xcode 6 , and, if so, how do I accomplish it ? The view should have aspect ratio 7:6 and the 4 buttons should appear as is shown in below.
ragnarius
  • 5,642
  • 10
  • 47
  • 68
2
votes
1 answer

Autolayout constraint priorities

I have UItableViewCell Custom cell as shown in attached screenshot. I have created xib cell using Autolayout. But I am not able to 1.set proper space between labels 2.set Height Priorities for labels 3.set Content Vertical and compression…
user1682759
  • 99
  • 10
2
votes
1 answer

illegal configuration error xcode6, can I disable it?

I have a number of projects which support iOs5. When adding a launch.xib file I have an error error: Illegal Configuration: Auto Layout on iOS Versions prior to 6.0 now everything works fine, I can build and run to my old devices, they don't…
Jef
  • 4,728
  • 2
  • 25
  • 33
2
votes
1 answer

Converting an iOS project to auto layout

I am using Xcode 6 and iOS 8. The project was written starting at iOS 5, not using Auto Layout. So there is plenty of auto resizing and plenty of code that moves controls and view by manipulating their frames. I know it works to use both, but do…
mickm
  • 515
  • 2
  • 11
  • 20