All Questions
Tagged with autolayout user-interface
66 questions
0
votes
1
answer
558
views
Collection View Stacking Items in Single Rows – Swift Xcode [duplicate]
Would someone please tell me why my collection view is stacking like this instead of side-by-side (until there's no more room and a new row has to be started)? I don't want them stacking with only one ...
-1
votes
1
answer
100
views
adding view without storyboard with dynamic size and frame
I'm trying to write a custom view (next button), which change it's width and position whenever the keyboard is displayed / hidden. My goal is to build it as generic as possible, and do not create it ...
1
vote
1
answer
670
views
Swift: Estimated Height Not Working for UICollectionView
My problem is that setting the estimated height for my collection view layout does not work. Specifically, the cell does not resize dynamically.
My hypothesis is my AutoLayout constraints are not set ...
0
votes
2
answers
684
views
How to programmatically pin a UIImageView
I read the documentation, but I just can't figure out what exactly is needed in my simple case.
The element is constantly jumping. I need just that.
I would be grateful for articles and so on. For a ...
0
votes
2
answers
424
views
UIScrollView with dynamic Footer
i have a Label and a ContainerView (With a Label and Switch as childs) in a ScrollView.
I want that my ContainerView has a Padding to the Label Bottom but if the Label
has too much height (that it ...
1
vote
1
answer
155
views
UIKit layouts subviews even though it was not asked to
I was messing with layoutSubviews method in UIViewControllers. I assumed that when you override layoutSubviews on the view, it doesn't layout its subviews, but that wasn't the case, the view and its ...
0
votes
1
answer
78
views
Interface Builder and NSTableView top constraint
I have the following UI definition:
I wanted to define the constraints for the components but whenever I try to add a constraint so that the Bordered Scroll View - Table View.top is topStackView....
0
votes
2
answers
163
views
iPhone 11 stimulator Autolayout constraint not working as expected
Here is the problem that I face. The bottom constraint I already put -100 but still in the iPhone 1 simulator still have appear a little small white gap. So what else can I fix this problem?
-1
votes
1
answer
164
views
iOS Autolayout how to maintain layout and aspect ratio with differing screen sizes, types and orientation
I'm having a frustrating time with auto layout and storyboards (probably because I do not use it enough - I tend to construct UIs using code as I find this useful when moving between platforms, ...
-3
votes
2
answers
702
views
How to add labels within a view programmatically
I'm experimenting with layout anchors, and I'm trying to replicate the following illustration: basically an outer view with an inner view. The inner view is anchored with constants to the outer view's ...
1
vote
1
answer
549
views
How to create a blent-in navigation bar like the one on Apple Music artist page
I'm trying to create a navigation bar (everything above "top songs" in the screenshot) that looks like the one used in the artist pages in the Apple Music app. On the iPhone X, the cover photo should ...
1
vote
1
answer
183
views
Error trying to set the constraints for a UIButton
Error:
2018-05-13 01:32:25.577503-0400 LoginScreen[2606:70991] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Unable to activate constraint with anchors <...
0
votes
1
answer
154
views
Programmatic auto layout
So I have a 2d array of UIImageViews which displays a game screen(like a chess board but in various rows/columns)
At the moment I have using the following auto layout code:
func setConstraints() {
...
0
votes
1
answer
704
views
Auto layout on subview inside subview (NSView)
I'm having hard time trying to properly set the auto layout for a subview inside another subview.
I'm using an example where two toolbar items show two different subviews (which works as expected), ...
-1
votes
1
answer
154
views
Autolayout - relationship between two objects, which is "dominant"?
Say I have two objects on the screen. I position one of them with constraints to be at the position and size I want it to be.
The other object's constraints are:
Align Center X to Object 1
Align ...