12,089 questions
6 votes
0 answers
230 views
Multi-line title in UIButton in a UITableViewHeaderFooterView causes UIViewAlertForUnsatisfiableConstraints warnings
I need to show occasional long texts in a UIButton in the section header of my UITableView. The following simple example code shows the issue: import UIKit import SnapKit class ViewController: ...
2 votes
0 answers
58 views
UIScrollView zoomed UIImageView doesn’t bounce on vertical edges during pan
The Issue I've created a zoomable image component for SwiftUI by wrapping UIScrollView and UIImageView using UIViewRepresentable. The core functionality, like pinch-to-zoom, double-tap-to-zoom, and ...
-5 votes
1 answer
75 views
Layout not called when constraints have been applied, particularly to labels, under a view? (Could be a bug / simulator problem.)
I had a custom UIView V which adds a stack view S with three labels L. It draws some CAShapeLayer lines. class CustomView: UIView { ///Consumers supply some texts and other info var input: [ ...
-1 votes
1 answer
82 views
Why is the bottom of the iOS safe area layout not aligned with the rounded corners in portrait mode?
Why is the bottom of the iOS safe area layout not aligned with the rounded corners in portrait mode, leaving a small clipped edge, while in landscape mode, it is fully aligned? Due to this clipped ...
1 vote
1 answer
113 views
iOS Autolayout - unable to have height be lessThanOrEqualTo
I am using SnapKit for auto layout in my iOS app. I need to show an image view at the very top of the screen. It will have an image of dynamic height and width. I need its top edge to be aligned with ...
0 votes
0 answers
32 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
2 answers
85 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
57 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
48 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 ...
1 vote
1 answer
571 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
225 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
102 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
73 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
1 answer
92 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
1 answer
36 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, ...