All Questions
Tagged with ios-autolayout or autolayout
12,115 questions
0
votes
0
answers
19
views
How to force left landscape a screen in a framework?
I am working on a Swift framework that requires specific screens to be displayed in a landscape-left orientation, while the rest of the application remains in its default portrait orientation.
I tried ...
0
votes
0
answers
31
views
How to setup Auto Layout constraints (or SwiftUI hack) that mimic iMessage's scroll-to-dismiss of input bar
Let's say I'm trying to mimic iMessage's message view. Currently, I have a UICollectionView and a text input view that are subviews of a UIViewController's view. The constraints are laid out to place ...
0
votes
2
answers
37
views
Dynamic Height Cell with XIB: Including UILabel and UIImageView
I’m trying to design a UITableViewCell with XIB that has the following layout and behavior:
A UIView on the left with a fixed size of 44x44.
A UILabel next to it, which expands dynamically based on ...
0
votes
2
answers
38
views
How to Create a Dynamic Height Table Header with Title and Description in UITableView?
I have a UITableView and I want to display a dynamic header at the top of the table.
I am trying to do this using tableHeaderView. The header contains a titleLabel and a descriptionLabel arranged ...
0
votes
1
answer
34
views
UITableViewCell 's content height constraint can not refresh in reloadData?
I have a simple demo AutoSizing UITableView project like this :
when you tap the tableview cells will make cell's red subview ‘s height constraint to bigger value(from original 60 to 100) and calling ...
0
votes
0
answers
48
views
UITextView in UIViewRepresentable: setting isScrollEnabled to false breaks the layout
I have a UITextView, within a UIViewRepresentable, so I can use it in a SwiftUI ScrollView. Im using intrinsic content sizing to set the frame of the content. This works great, until I set ....
1
vote
1
answer
145
views
SwiftUI's layout engine does not respect content size of UIViewRepresentable and expands size to whole screen
I'm trying to incorporate a UIViewRepresentable into my SwiftUI app. My goal is that the view is displayed with the dimensions (especially height) it needs to fit the content. However, SwiftUI somehow ...
1
vote
1
answer
186
views
Problem with height calculation automatically to UICollectionView inside a UITableViewCell
Good?
I have a problem with the implementation of a UICollectionview intro a UITableViewCell, because the height calculation of this component does not work properly, even though using ...
0
votes
4
answers
74
views
How to keep UIView height consistent when UILabel text varies between 1 and 3 lines?
I have a view structure implemented in Swift using UIKit where a UIView contains a UILabel. The UILabel can have text with 1 line at minimum and up to 3 lines at maximum. I want to ensure that the ...
0
votes
1
answer
50
views
ScrollView start under the StatusBar
At the top of scrollView, I have an imageView and i want it to be at the top of the screen but no matter what i tried i could not find a way to put it on the top of the screen. It starts under the ...
1
vote
1
answer
36
views
constraint rotated vertical uislider
This is how I would like my ui slider constrained.
However the slider is not vertical. To make it vertical I have to use sliderX.transform = CGAffineTransform(rotationAngle: CGFloat(-Double.pi / ...
0
votes
1
answer
74
views
Prevent text in UITextView from bleeding outside of textView
I have a UItextView within a UIViewController created in storyboard. The UITextView has an outlet property myTextView and constraints that keep it at a fixed size. One wrinkle: The vertical ...
0
votes
0
answers
19
views
UITextView Leaves a Gap Below Keyboard When Dismissing on Swipe in Live Chat Interface
I'm developing an iOS app in Swift with a global live chat interface. The interface includes a UITableView for messages, a UITextView for typing messages, and a send button. Everything is set up using ...
0
votes
1
answer
31
views
Autolayout interaction of Storyboard elements with UI elements created programmatically using Objective-C and Swift
Because, I have a very complicated storyboard, I thought it would be a good idea to add conditional elements programmatically. In particular, if the text for a UILabel in the storyboard is too great, ...
-1
votes
1
answer
41
views
Understanding behaviour of anchors with non-equal constraints
If i create a constraint like this.
contentView.trailingAnchor.constraint(greaterThanOrEqualTo: bubbleImageView.trailingAnchor),
Here is the result, checkout the blue bubble constraint. contentView ...