4,459 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
77
views
How to reduce cell height (vertical margins) when using UIListContentConfiguration
The default cell height is 44pt in iOS 18 and 52pt in iOS 26. I'm trying to reduce the height back to 44pt in one screen that needs to fit as much content on screen as possible. How do you reduce the ...
0
votes
1
answer
80
views
Why are my UICollectionViews all showing the same cell data (the last array entry)?
I use 2 custom classes that inherit UICollectionView. Both are showing a similar bug of all the items in the collection view are showing the last item in the source array.
For example this code ...
-1
votes
1
answer
199
views
Do I need a UICollectionView.CellRegistration for every individual (content)configuration type?
I am a bit struggling with the concepts of UICollectionView.CellRegistration and dequeueConfiguredReusableCell and reusing them. It seems I cannot find the answer on this site either. Sorry if this is ...
1
vote
1
answer
514
views
How to run tasks off the main actor with Swift Concurrency
I am using a Task block to fetch images from disk to be displayed in a UIImageView.
I noticed that as I scroll the collection view, there's noticeable lag caused by the getArtwork method meaning it is ...
1
vote
0
answers
164
views
How to make a simple collectionView on a storyboard display data from a diffable datasource
I'm trying to do something very similar to How to make a simple collection view with Swift (with a storyboard), the only difference being that I want to use a diffable datasource, whereas in the ...
0
votes
0
answers
33
views
CollectionViewCell updating wrong after scrolling
I have a collection view that lists a number of items that initially are not selected. If the user taps on them, a border appears around the element and the id for that element is added to an array. ...
0
votes
1
answer
157
views
Manually call updateConfiguration swift
I have a simple cell which contains text and switchView
final class MFTestLabel: SUCollectionCell {
// MARK: - Properties
weak var delegate: MFTestLabelDelegate?
private let ...
0
votes
1
answer
41
views
UICollectionviewCell when scroll horizonatlly to next page only half cell is display
I am using UICollectionView, where It should works like carousel.I want to display some part of previous cell - current cell - some part of next cell. I have played around with item size and ...
0
votes
0
answers
47
views
UICollectionView Padding/EdgeInsets for views in children
I have a UICollectionView which uses a UICollectionViewFlowLayout to layout its children. These children will have varying heights, so I need to adjust the UICollectionView such that the elements are ...
1
vote
0
answers
231
views
Dynamic width horizontal Collection view using compositional layout
I am trying to create a collection view that has a simple cell with text, which means that the width and height of the cells should be dynamic. Since it should be able to be shorter/longer and the ...
0
votes
1
answer
46
views
Using UICollectionViewCell with IBOutlet
I wonder if it is possible to use UICollectionViewCell with IBOutlet? As I always get this error
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'the cell ...
1
vote
1
answer
81
views
How can I create horizontal collection view with auto height in swift?
I created a horizontal collection view that calculates its own height, but the height is not calculated as desired.
My flowlayout and height constraint codes are as follows:
if let flowLayout = ...
0
votes
2
answers
106
views
How to set correct tintColor with selected but not focused UICellAccessory.customView
In a UICollectionView within a UISplitViewController layout, I have a UICollectionView.CellRegistration that shows under certain conditions a warning badge as UICellAccessory.
This warning badge ...
0
votes
1
answer
203
views
How to calculate the cell size?
How to calculate the cell size so that different devices display the same number of cells in row and column, and the cell height is adjusted to the screen size of the device?
I tried calculating it ...
0
votes
1
answer
50
views
Unable to give required width, and height for collectionview cell in swift
I have gicen collectionview height as 300 and added cell with imageview and label
for label given constraints bottom, leading, trailing = 10 and for image given top, leading, trailing = 10, bottom = ...