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
4
votes
1 answer

TURN OFF: "Unable to simultaneously satisfy constraints"

How do I turn off this constraint conflict logging? Eventually, I will get back to fixing the constraints in my project. In the meantime, I am unable to read my console due to all the crap that's being spammed. I'm talking about: Will attempt to…
Brandon M
  • 349
  • 2
  • 20
4
votes
0 answers

Increase bottom layout length/inset/padding

Subclass UITabBarController Hide/remove original tab bar Put custom view to bottom of the UITabBarController view UITabBarController -> UIViewController -> UIScrollView (pinned to superview all edges, not layout, and set adjusts scroll view insets…
Olexiy Pyvovarov
  • 870
  • 2
  • 17
  • 32
4
votes
2 answers

Multiline UILabel same width as intrinsic content sized UILabel

I'm trying to align two UILabel's using Auto Layout, where the first label has no set width but using intrinsic content size and the second should be the same width as the first, wrapping text to new lines. Ideally the second label should have…
Aleksander
  • 2,735
  • 5
  • 34
  • 57
4
votes
5 answers

Hiding a view when orientation changes to landscape in autolayouts

I am creating a sample application in which i am copying Facebook screens in order to practice auto layouts. When I run login screen in portrait mode, it looks perfect. The problem is as soon as the orientation changes to landscape, all the views…
kinza
  • 535
  • 11
  • 31
4
votes
1 answer

iOS App layout is wrong with calling status bar

Faced with an issue with status bar during active call and application layout. I'm using autolayouts. When I run the app, and then start a call, all works fine, the UI is scaled properly with changed status bar. But if I first start a call and then…
Vasyl Khmil
  • 2,548
  • 1
  • 20
  • 36
4
votes
6 answers

Getting ScrollView to Work with Autolayout and Storyboard

I am trying to make a really simple layout for an app I want to build - but I seem to be struggling with ScrollView and getting it to work via Storyboard. Basically I am trying to build below: I have done the constraints using several tutorials -…
UKDataGeek
  • 6,338
  • 9
  • 46
  • 63
4
votes
2 answers

Programatically setting auto layout constraints for a UIView's subviews

Below I have included some code for you to checkout. I am trying to take a custom UIView and add another custom subview to it. This subview should be constrained to the parent view in such a way it essentially just lays on top with the same…
user3832583
  • 371
  • 4
  • 19
4
votes
1 answer

why autolayout preview and actual device do not match

I am doing xamarin.ios and I am doing the UI i.e autolayout in xcode. In xcode preview ... I am able to see the UI is good but in the device in some of the devices UI is not as it appears in preview. such as iPhone 5s,iPhone 6s plus. Can somebody…
Sharath
  • 275
  • 1
  • 18
4
votes
1 answer

What advantages does SnapKit have over using autolayout in Interface Builder?

I've been using Interface Builder almost exclusively ever since Apple introduced autolayout for iOS. I recently came across SnapKit but I don't see any immediate advantage this has over using constraints in IB. The only thing it's got going for it…
Sid
  • 9,508
  • 5
  • 39
  • 60
4
votes
2 answers

AutoLayout: UIImageView and Aspect Fit content mode

I'm trying to place an UIImageView in the parent view's center. Image must keep its original aspect ratio and also it shouldn't exceed parent's bounds. So landscape images should be limited by parent's width and portrait images should occupy as much…
fraggjkee
  • 3,524
  • 2
  • 32
  • 38
4
votes
2 answers

Navigation with only Back Button and transparent background

I had tried to implement Navigation Controller which embeds in my View Controller. It works as expected. But my requirement is slightly different which needs only a back button and already have a top banner with logo image background in all the…
user2695433
  • 2,013
  • 4
  • 25
  • 44
4
votes
2 answers

UIScrollView with Autolayout Ambigous height

I've read a lot of manuals/tutorials on ScrollViews with vertical scrolling, but havent figured out how to solve my problem so far. You can see my ScrollView visual plan here: ScrollView plan The most helpful answer was here, on…
oleskii
  • 366
  • 3
  • 14
4
votes
5 answers

how to insert images in collection view cell

I want to insert three images in collection view cell, 3 images. One image for each cell.Only one section. But when the simulator shows black screen, no any images. Here is part of my code: import Foundation import UIKit class…
beasone
  • 1,073
  • 1
  • 14
  • 32
4
votes
1 answer

How to make an item full width in auto layout constraint?

I'm trying to make a button full width in ios 9 storyboards, and am trying to create a width auto constraint, but the width constraint only seems to take an exact static number. How do I make the item go full width. Additionally if I wanted say…
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460
4
votes
3 answers

All uitableviewcells become one line in height on iOS 9

I have an app with several UITableView controllers. Running on iOS 8.x, the height of all the cells in each table would resize to fit the content of the cell (all contain just a UILabel with plain text). Now when running on iOS 9, every cell on…
ChiliOcean
  • 61
  • 1
  • 6