Skip to main content

All Questions

Tagged with
0 votes
1 answer
36 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 ...
Kalzem's user avatar
  • 7,424
0 votes
2 answers
81 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 ...
Joon's user avatar
  • 11
0 votes
0 answers
45 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 ...
Muhammad Haroon Iqbal's user avatar
-2 votes
1 answer
58 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",...
Dewerro's user avatar
  • 443
-1 votes
1 answer
26 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 ...
Zack Cheang Weng Seong's user avatar
0 votes
0 answers
41 views

Align image inside DTImageTextAttachment

I am trying to add an image to DTAttributedTextContentView and align it using DTImageTextAttachment like so: func addAndDisplayImage() { guard let image = UIImage(named: "test") else { ...
Andrew's user avatar
  • 25
1 vote
1 answer
100 views

How to right align a UIStackView inside a UIScrollView when the stack view's size is smaller than scroll view?

Please look at the below picture of my storyboard to understand the layout of my views. On the left side is a horizontal UIStackView with 2 buttons. This is okay. On the right side of the above stack ...
sudoExclamationExclamation's user avatar
0 votes
0 answers
23 views

UIView animation layoutIfNeeded causes top Constraint to break at the start of animation if not called on superview

I am able to demonstrate the issue with the below simple example code. I basically have a custom View (sort of like a nav bar) on which I animate the bar to hide/show the blue area (which will contain ...
sudoExclamationExclamation's user avatar
0 votes
1 answer
58 views

Sizing DTAttributedTextContentView based on its attributedString

I am trying to self size DTAttributedTextContentView inside the collection cell based on its attributed text. The problem I face is that when I set attributedTextContentView width constraints like so: ...
Andrew's user avatar
  • 25
-1 votes
1 answer
40 views

layerClass breaks auto layout

I made a custom view which has CAGradientLayer as a layer, and I added this view on the other view with bottom anchor. It was just very simple auto layout constraint with bottom, leading, trailing and ...
Ryan's user avatar
  • 4,874
0 votes
1 answer
69 views

UILabel not drawing text properly in UICollectionViewCell

I have a UILabel that sits inside a UICollectionViewCell. The UILabel is multiple lines and may be different sizes based off of the text supplied. The cell sits in a collectionview with a simple ...
Moses Harding's user avatar
0 votes
0 answers
39 views

iOS: When layoutIfNeeded() is called on a specific subview, it is not displayed on the screen

I am dynamically adding and displaying a custom view. At this time, the custom view has subviews. When showing a custom view and additionally showing internal subviews, I am curious as to why the ...
sweetSwift's user avatar
4 votes
0 answers
389 views

Modifications to the layout engine must not be performed from a background thread on iOS 17 and above

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Modifications to the layout engine must not be performed from a background thread after it has been accessed from ...
Vimal's user avatar
  • 69
0 votes
1 answer
219 views

Content hugging and content compression resistance with minimum margin between views

I was trying to create a UI with two labels placed horizontally in parallel to other edges on the screen so that they can grow according to the content they receive. and I tried setting up content ...
Maverick's user avatar
6 votes
1 answer
422 views

Auto Layout Constraint Conflict in SwiftUI When Tapping TextField

I am developing an iOS app using SwiftUI and have encountered an Auto Layout constraint conflict issue that appears when tapping on a TextField within a LoginView. I've tried several troubleshooting ...
bublwrap2100's user avatar

15 30 50 per page
1
2 3 4 5
640