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
3
votes
3 answers

New to auto layout, views not displaying as configured in IB

Ive been going nuts over this for days and I've tried everything I know so far about auto layout but can't get past this. I have a stack of buttons and a label. The label is at the top and 5 buttons below it. Each View is a rectangle that is 8…
dan10
  • 119
  • 2
  • 12
3
votes
2 answers

iOS Adaptive Layout with React Native

Iv'e been working with react-native for a couple of weeks now and I have reached a point where I need to support both orientations. Allegedly flex-box should do its magic and automatically adapt the layout to the new screen size. However flex-box…
Daniel Lahyani
  • 925
  • 8
  • 15
3
votes
3 answers

Animate UILabel width with auto layout

I'm trying to animate UILabel's width. For some reason animation doesn't work and label changes it's size immediately. I use autolayout. Here is the code from the sample project I wrote to reproduce this. Tap on the button changes trailing…
Anastasia
  • 3,024
  • 1
  • 23
  • 34
3
votes
0 answers

Launch Screen Storyboard Image vs Launch Image Set

When you use an asset catalog and a launch image, Apple provides all of the sizes you need in the launch image, image set: It's a special category of image set. However, if you need to use a launch storyboard instead, you can't use that launch…
Matt Long
  • 24,438
  • 4
  • 73
  • 99
3
votes
2 answers

Hide subviews when superview height change while using auto layout constraints

I have one UIView, it's having few subview controls like label's and textbox. it is also having one switch control. I want to hide/display (like collapsible) the portion on the superview based on the switch change. However when I try to do it with…
Parth Pandya
  • 1,460
  • 3
  • 18
  • 34
3
votes
1 answer

Access constraint in code, which was created in iOS Designer

In Interface Builder (Xcode) one can visually create a constraint and later add an outlet to access the constraint in code like in this example. Is something similar possible in iOS Designer (Xamarin Studio)?
testing
  • 19,681
  • 50
  • 236
  • 417
3
votes
0 answers

Understanding the output log's auto layout data

I'm debugging a crash that I believe is auto layout related. When the crash occurs, I get an enormous dump of information on the output area that begins like this: 2015-06-04 13:23:44.158 SpeedySend[22084:861374] Objective: {objective …
Gallymon
  • 1,557
  • 1
  • 11
  • 21
3
votes
2 answers

How to make Auto Layout for Universal App

I'm now doing an universal app; I faced a problems on auto layout; I need to make two views with same size on all devices; I worked on storyboard with view wAny hAny; and here the images I reach The problem on iPad the bottom view it's very big and…
Sonic
  • 518
  • 1
  • 7
  • 19
3
votes
1 answer

iOS auto layout: how to design different layouts for iPad landscape and iPad portrait in Xcode storyboard?

I am new to size class and auto layout in iOS. I am practicing the same through a small application. Below is what I am trying to achieve through auto-layout and size-class. Below are the specific screenshots for iPad portrait and iPad landscape…
Rashmi Ranjan mallick
  • 6,390
  • 8
  • 42
  • 59
3
votes
2 answers

NSLayoutconstraint breakage since xcode 6.3

I am trying to set the below constraint to one of my floating view. leftConstraint = [NSLayoutConstraint constraintWithItem:detailView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual…
Friendtam
  • 311
  • 4
  • 11
3
votes
4 answers

How to stop UILabel from truncating with '...' in UITableCellView

I have two UILabels in a custom table cell, each with "Lines" set to "0" in Interface Builder. They are vertically stacked with left and right edges aligned, inside a table with row height determined by auto layout. But one of them insists on…
Rob N
  • 15,024
  • 17
  • 92
  • 165
3
votes
2 answers

iOS - Performing several simultaneous animations with autolayout

I want to perform two simultaneous movement animations. First animation on firstView starts immediately. Second animation on secondView, starts after a slight delay while the first animation is still running. secondView constraint is related to…
tonymontana
  • 5,728
  • 4
  • 34
  • 53
3
votes
1 answer

UIScrollView's Content View is ignoring equal width constraint to main view on Xcode 6

I've added a Scroll View that contains a content view. The scrollview's constraints keep it just below my progress bar and attached to the leading, trailing, and bottom of the superview. The content view's constraints hold it to the sides of the…
3
votes
1 answer

iOS Autolayout to set width and height according to screen size

What constraints I should add to set width and height proportional to the Superview (in my case its the UIViewController's view) in iOS Autolayout, with Autoresizing we can do like the pic shown below.
Haider
  • 4,961
  • 2
  • 18
  • 25
3
votes
0 answers

XCode - Auto layout error each time re-open project

I've created a project using XCode "Version 6.0.1 (6A317)". I've used auto layout and size classes too. The problem seems to be an awkward one. Whenever i reopen the project, auto layout constraints changes to something else. e.g a UIButton has…
Akshit Zaveri
  • 4,166
  • 6
  • 30
  • 59