All Questions
Tagged with ios autolayout
9,606 questions
0
votes
2
answers
35
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
35
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
33
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
183
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
49
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 ...
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 ...
0
votes
1
answer
102
views
How to force break lines of a UILabel cell in a UICollectionView (Compositional Layout)
I have a UICollectionView that acts as a list of tags.
It uses a horizontal compositional layout.
Here is a screenshot:
My problem is that if I have a tag longer than the collection's width, it ...
0
votes
2
answers
348
views
Why is KeyboardLayoutGuide not applied in viewIsAppearing() in iOS 15.0?
Since viewIsAppearing() appeared, I am using addSubview() in viewDidLoad() and applying Constraint in viewIsAppearing().
I placed the SearchBar at the bottom of the screen, and used ...
0
votes
0
answers
76
views
Crash: Thread 1: "Tried accessing the col index for a variable that is a row head:0x6000021a7b60.marker{id: 8773}.brokenNegError{id: 23368}" in swift
I am developing a chat application for iOS in swift. I am using different cells for text message, images, files etc having attributed labels in each cell to display formatted text, to sync with web ...
0
votes
1
answer
92
views
Why does UIImage with SymbolConfiguration change UIImageView frame?
I am making UIImageView with UIImage.SymbolConfiguration.
let config = UIImage.SymbolConfiguration(font: .preferredFont(forTextStyle: .title1))
imageView.image = UIImage(systemName: "person",...
-1
votes
1
answer
36
views
When using autoresizing mask layout. How do I satisfy the warnings?
I get this warning.
Views without any layout constraints may clip their content or overlap other views.
However, I am using autoresizing mask, I shouldn't need to use constraints. Is there something ...