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

Why are my autolayout constraints conflicting?

I have an app using scroll view on a page with numerous icons within that scroll view. I don't understand auto layout very well, but I have constrained every single icon to its current canvas value to the view (after measuring and placing each icon…
Mi Ch
  • 11
  • 5
-2
votes
2 answers

Autolayout Xcode 8

I'm trying to pin all labels and buttons using auto layout. But it seems to be impossible. I've tried almost everything (tutorials also - been there done that), and it still sucks. On every device (Iphone 7plus, 6) it looks much different, sometimes…
belab
  • 117
  • 3
  • 12
-2
votes
1 answer

iOS UITableView cells loading even if off screen

What would be possible issues having a UITableView load all of it's cells even though most are off screen? The custom cells are using Auto-Layout as well as the entire screen that the table view is in. This is happening in ios versions 8, 7, 6
ort11
  • 3,359
  • 4
  • 36
  • 69
-3
votes
1 answer

What does this error mean after I remove a specific constraint?

I just started learning swift so my question must seem trivial to you. After applying Autolayout to the button by adding alignment constraints where "Horizontally in Container" and "Vertically in Container" both set to 0 , and by adding another…
Farouq
  • 3
  • 1
-3
votes
2 answers

Autolayout programmatic aspect ratio setting

I am trying to add a subview to view and define autolayout constraints, including aspect ratio. But aspect ratio that I see at runtime is not what I defined in constraints. What am I doing wrong? As you can see in code, background view height should…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
-3
votes
2 answers

Buttons and auto layout: two things... two problems

Look at this image, please : 1' problem: i'd like to build it in iPhone SE, 8, 8 Plus and X but i can't do it. 2' problem: I used image and text insets to place the central image above the text. Changing the iPhone devise, and changing the…
Claudio F
  • 15
  • 3
-3
votes
2 answers

Change height and width of ImageViews proportionally

I have a View like shown in the image. Leading and trailing distance is increasing when showing view on different screens. How do I make it look good on every screen by using constraints.
bhupinder
  • 315
  • 1
  • 6
  • 23
-3
votes
2 answers

Is it possible to make one design which can be used for different devices in iOS?

I am working on iOS design for iOS app ,but I have to use size class for each devices . Is there any way if I use one design which can be worked for other devices as well like android.
-3
votes
1 answer

How different iPhone x actual screen size from iPhone 8 plus

Here we could see the size difference in iPHone X actual screen size. I know it has wedge on top of the screen .. so am I safe to assume to App size occupied by app in iPhone X and iPhone 8 plus is same. Can somebody clarify
-3
votes
1 answer

Layout is not working for iPhone 6

The calendar displays for iPhone 5 but does not work for iPhone 6.In iPhone 6 the layout is changed this is my code: calendar = [[DSLCalendarView alloc]initWithFrame:CGRectMake(10, 64, 320, 320)]; this is image for iPhone 6 its not working This…
-4
votes
1 answer

Why is it asking me for a Y position or a height? How can I fix it?

This is a very basic question and I am just not being able to fix it. I am just trying to have two equal sized views on my scene. And I've set the constraints on both and having the: vertical distance between them be 0 Both leading and trailing…
J W
  • 107
  • 1
  • 10
-4
votes
1 answer

Change a custom view height based on the label height Swift

I marked the view inside a circle, the vertical line. .I want to increase its height when the right side labels height increases. The labels become multi line based on the content.Help me figure it out. Is there have any autolayout way to do it ?
Yasheed Mohammed
  • 187
  • 1
  • 14
-4
votes
3 answers

iOS tableView slide horizontal when use autolayout

iOS tableView slide horizontal when use auto layout. but drag the tableView for a while. the tableView become normal. but cell.subViews use frame to layout will normal. the project is very old. all the code move to a new project, it's normal.
-5
votes
1 answer

Creating a UIView programmatically

If I create a UIView with a frame like - UIView(frame:..) AND also set constraints on this view will the frame dimensions take precedence over the constraints? Will iOS runtime ignore the constraints? I created a UIView in viewDidLoad() with a frame…
cubsnlinux
  • 365
  • 3
  • 15
1 2 3
69
70