ios-autolayout Questions
2
I built a custom view controller. It has 1 tableview, 2 views and 1 map. When I set the constraints for this layout it works fine. I close project and reopen the map view out of the view controller...
Rhizocarpous asked 15/8, 2016 at 12:22
7
Solved
I have a custom UIViewControllerRepresentable (layout-related code shown below). This tries to replicate the native SwiftUI ScrollView, except it scrolls from the bottom except the top.
View hierar...
Michelson asked 15/10, 2019 at 16:33
23
I have a UITableView running under iOS 8 and I'm using automatic cell heights from constraints in a storyboard.
One of my cells contains a single UITextView and I need it to contract and expand ba...
Extine asked 31/7, 2014 at 12:55
18
Solved
I would like the UICollectionView (The red one) to shrink to the height of the content size in this case UICollectionViewCells(the yellow ones) because there is a lot of empty space. What I tried i...
Pitterpatter asked 24/2, 2017 at 11:52
2
Is there some kind of system wide notification when the Auto Layout Trait Collection changes in iOS 9+?
I know the UIViewController method traitCollectionDidChange but I would like to handle the t...
Pearson asked 28/8, 2017 at 9:7
30
Solved
I have a UITableView with a custom UITableViewCell defined in a storyboard using auto layout. The cell has several multiline UILabels.
The UITableView appears to properly calculate cell heights, b...
Neilla asked 22/9, 2014 at 9:48
3
Solved
I am trying to add a constraint to a tableview I created and added to view programatically. I want to constraint it based on a UITextField which is an IBOutlet. However, I am getting the following ...
Tina asked 8/4, 2019 at 11:58
12
Solved
I am trying to use a default AlertViewController with style .actionSheet. For some reason, the alert causes a constraint error. As long as the alertController is not triggered (displayed) through a...
Aubreyaubrie asked 12/4, 2019 at 13:49
8
Solved
Same code like this
collectionLayout.estimatedItemSize = CGSize(width: 50, height: 25)
collectionLayout.itemSize = UICollectionViewFlowLayoutAutomaticSize
collectionLayout.minimumInteritemSpacing ...
Soapwort asked 17/7, 2018 at 7:28
3
Solved
i have a scrollview which has a picture, text, button, label and then a collectionView whose number of rows is dynamic in nature. Its like collectionview will grow in height and hence the scrollvie...
Fimbriate asked 27/4, 2018 at 13:0
2
Solved
I have a button inside a view. I have set image for my button in interface builder.
The constraints that I have added to my button in interface builder is:
Right space to superview = 10
top space...
Monetta asked 17/4, 2016 at 7:37
9
Solved
When using Auto Layout, I am unable to set up a simple UIScrollView in my view controller in Xcode 11 beta. I know that I must constrain the scroll view to the edges, and then set the scroll view w...
Pulitzer asked 12/6, 2019 at 21:33
5
Solved
In Xcode 6, I could use the Editor menu to Pin:
Leading Space to Superview
Trailing Space to Superview
Top Space to Superview
Bottom Space to Superview
I can't find a way to do this in Xcode 7 ...
Gelderland asked 30/7, 2015 at 21:3
4
Solved
I want my app to be optimized for every accessibility options including the text size.
I made a collectionView layout based on sections with a compositional layout. So I need my cell's height to g...
Judiciary asked 11/10, 2019 at 10:20
4
Solved
I have a tableView with static cells. The cell contains an ImageView which fills it completely. And I have another smaller ImageViews atop. I position this ImageViews with constraints. I have a que...
Gyrostatic asked 24/6, 2016 at 11:25
15
How do I turn a rectangular image view into a circular image view that can hold shape in auto layout without setting width and height restraints? Thereby allowing the imageView to define it’s size,...
Epithelium asked 2/9, 2015 at 20:54
2
Solved
I am getting this crash after converting an existing UIViewController to Auto Layout and I can't figure out what is causing it. I did search for dispatch_async(dispatch_get_global_queue(...)) calls...
Airbrush asked 28/3, 2017 at 14:0
2
Solved
I have an app that will have a
scrollView
contentView
chart
buttons
other stuff
I tried constraining it like shown below, but I am missing a constraint and I can't find out what I need.
...
Starfish asked 17/10, 2018 at 13:0
3
I'm using Xcode 8 building for iOS 9 and using auto layout.
Occasionally when I install a constraint in Interface Builder there's an immediate conflict. When I click the red disclosure and look at...
Cyndicyndia asked 14/10, 2016 at 17:53
2
I use XIB in most of my apps instead of Storyboards. As you can see from the picture, I have Safe Area Layout Guide enabled as well as Auto Layout, but for some reason, my XIB still shows top and b...
Reggiereggis asked 4/11, 2017 at 17:3
1
Solved
I am trying to create the constraints of this layout in SnapKit but I have difficulty setting the maximum size (lessThanOrEqual).
let maxWidthContainer: CGFloat = 435
let maxHeightContainer: CGF...
Designate asked 11/9, 2019 at 17:46
4
I am trying to layout some custom views and when I try to activate the constraints, Xcode says that I can't use multiplier. Here is an example of the code:
class MenuView: UIView {
var addButton...
Blotchy asked 5/8, 2016 at 12:0
6
Solved
I want to make the center of the head imageView with the bottom of the blue title imageView's keep alignment.
How can I do it by using Autolayout?
screen 4.0inches
screen 4.7inches
Swagger asked 22/5, 2016 at 6:21
2
I am displaying modal UIViewController with modalPresentationStyle = .formSheet but it has some issues on iphone XR and XS Max. It's displayed behind notch. Image bellow from left side iphone XR, X...
Tinhorn asked 9/1, 2019 at 9:31
2
In my iOS app, I have views rendered beneath the navigation bar. This is because the navigation bar is hidden until the user taps the screen.
The screenshots below illustrate my problem.
The "X"...
Dierdre asked 16/5, 2018 at 7:16
1 Next >
© 2022 - 2024 — McMap. All rights reserved.