Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
69 views

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 ...
Jordan H's user avatar
  • 56.5k
0 votes
1 answer
80 views

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 ...
user30968663's user avatar
-1 votes
1 answer
186 views

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 ...
aiso's user avatar
  • 31
1 vote
1 answer
498 views

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 ...
User95797654974's user avatar
1 vote
0 answers
160 views

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 ...
Ugo's user avatar
  • 183
0 votes
0 answers
32 views

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. ...
cesarcarlos's user avatar
  • 1,469
0 votes
1 answer
150 views

I have a simple cell which contains text and switchView final class MFTestLabel: SUCollectionCell { // MARK: - Properties weak var delegate: MFTestLabelDelegate? private let ...
Caramel's user avatar
  • 39
0 votes
1 answer
41 views

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 ...
nadim's user avatar
  • 786
0 votes
0 answers
43 views

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 ...
Girish Nair's user avatar
  • 5,211
1 vote
0 answers
223 views

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 ...
Ariel Congestri's user avatar
0 votes
1 answer
44 views

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 ...
jac's user avatar
  • 161
1 vote
1 answer
81 views

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 = ...
Aproachate's user avatar
0 votes
2 answers
79 views

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 ...
Ely's user avatar
  • 9,344
0 votes
1 answer
200 views

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 ...
Novice's user avatar
  • 11
0 votes
1 answer
50 views

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 = ...
Swift's user avatar
  • 1,180
0 votes
1 answer
165 views

I want to make certain view in cell of collectionView tappable. Code Of ViewController class ViewController: UIViewController { let collectionView:UICollectionView = { let view = ...
Muhammad Kumail's user avatar
0 votes
1 answer
21 views

I placed a CollectionView inside a TableViewCell. I added a Label inside the CollectionViewCell and set up all the constraints using Xib. However, the CollectionView still relies on the width and ...
Ufuk Köşker's user avatar
0 votes
1 answer
96 views

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
-1 votes
1 answer
80 views

I've been working on a collection game using apple maps in Objective C. Each item you collect appears in a uicollectionview. it works perfectly fine until you get around 15 or so and have to start ...
Jobalisk's user avatar
  • 728
0 votes
2 answers
1k views

I Am using UICollectionViewCompositionalLayout to create dynamic width, fixed height, tag cell type of layout in some sections of my collectionview. When i add a new string to an array in my database, ...
caa5042's user avatar
  • 174
1 vote
1 answer
36 views

I want to move the position of a UIView boardGame: UICollectionView to be on the center of the screen by modifying the constraints properties such as topAnchor, but anything I do to it seems to affect ...
willd's user avatar
  • 153
0 votes
1 answer
205 views

In my setup I have a horizontal collection view with chip style, on initial load the first chip is selected by default and corresponding to the chip an API call is made and it's data is loaded into a ...
Nikhil Muskur's user avatar
1 vote
2 answers
1k views

I would like to display the properties in a list of objects, but if the properties don't have any values I'd like to not only leave it blank but have the entire row not there at all (that's key). Here'...
Bob's user avatar
  • 347
0 votes
1 answer
47 views

All CollectionViewCell height equal to largest cell label dynamic content full code in swif import UIKit class YourViewController: UIViewController, UICollectionViewDataSource, ...
dax tech's user avatar
0 votes
1 answer
75 views

I have created a collection view with compositional layout, Below is the code I have used for creating the layout. func getCompositionalLayout() -> UICollectionViewCompositionalLayout { ...
Gulam Ali's user avatar
0 votes
1 answer
226 views

I have a collectionview, and each cell has an 'empty star' button. When the user taps on that button, the image of the button should become a 'filled star.' The collectionview should sort itself so ...
Moses Harding's user avatar
0 votes
2 answers
41 views

I have given constraints for image and label like this Image constraints. Label Constraints code: with this code i am able to get selectedNamesArray but unable to change cell colour. where am i wrong? ...
new dev's user avatar
-1 votes
2 answers
437 views

Here is a screenshot of what I want to achieve: I need this type of collection view layout for card cells (with leading and trailing edging displays). import UIKit class ViewController: ...
RP__'s user avatar
  • 1
0 votes
2 answers
132 views

Hi Community I wanted to implement a UICollectionviewCell which have size of 110 and each row have 3 cells initially 1.) Now need to do some modification in such way firstRow should have 3 cells but ...
Sanjay Mishra's user avatar
0 votes
1 answer
23 views

I have a collectionViewCell with 2 imageView in it. I create 8 from this Cell. I have a function called Flip which allows me to change the imageView. What I want to do is that when the game starts, ...
mertserkan's user avatar
0 votes
1 answer
62 views

cells are not showing in particular order i need 3 cells in a row so tried CGSize(width: UIScreen.main.bounds.width * 0.3, height: 100) but getting unrelated out put code: class ViewController1: ...
User123's user avatar
  • 41
0 votes
1 answer
60 views

Context: I have a collection view with dynamic cell height defined by its cell's content. The cell's content: a UIView, a UILabel, and a UIImage (image and label vertically positioned). Problem: ...
robinyapockets's user avatar
1 vote
0 answers
49 views

To make a collectionView where each cell has a delete button, I can think of two ways: Create a custom cell that has the delete button. Cons: We have to create a custom cell from an existing cell ...
Andy's user avatar
  • 378
0 votes
1 answer
40 views

Ten extra UITableViewCellContentViews appear blank and stacked on top of each other in the TableView. Sometimes it happens, sometimes it doesn't. You mentioned that you have defined cells above and ...
yselimguner's user avatar
0 votes
1 answer
207 views

I am creating collection-view with screen transition and then An error which is "Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value". I have attached ...
Mike's user avatar
  • 3
2 votes
1 answer
82 views

Working on one screen where there is UITableView and reusable UITableViewCell with UIButton actions UITableView is having high (twice in ms) reload frequency because of reloading frequently, the cell ...
Harsh Pipaliya's user avatar
2 votes
1 answer
2k views

I created an infinite horizontal collectionView presenting the first 6 items of my database, something like carousel. So, when I am scrolling to the right side, I can see those 6 items with the order ...
Louiza A's user avatar
0 votes
1 answer
92 views

I am trying to make my tableView that is nested in a CollectionViewCell animate when it collapses and expands like in the FotMob app: FotMob example When I try this it just either don't animate or ...
Kristoffer Melen's user avatar
0 votes
1 answer
209 views

I need an animation when a collection view cell is tapped. I wrote an override function for it. But UICollectionView didSelectItemAt is not working when I override touchesBegan on the custom cell. ...
cevhers's user avatar
  • 41
1 vote
1 answer
67 views

I've used CollectionViews in my project in another area of my project successfully with no issues, but this one simply won't display the data in the cell no matter what I do. I can see the cell ...
Prescott Chartier's user avatar
1 vote
0 answers
66 views

I'm developing a messaging app that fetches messages and their associated media from a server. I'm using a UICollectionView to display these messages, initially showing a placeholder until the actual ...
fun lab's user avatar
  • 29
1 vote
2 answers
370 views

Aligning CollectionView Cells to Left with equal spacing in between (Cells will be of dynamic width depending on the data received i.e the length of the string that will go in the cell). My Custom ...
Abhishek C. Gidde's user avatar
0 votes
1 answer
63 views

I am trying to make a little horizontal UICollectionView in the top section of my app but every time I load the app there are always like 2 or 3 cells that don't load its content. And the cells that ...
Kristoffer Melen's user avatar
0 votes
1 answer
152 views

I am trying to achieve this kind of tag layout (collectionview cells with dynamic width and height) but code crashes with some constraint errors when the text for a label within a cell is very long. ...
caa5042's user avatar
  • 174
1 vote
1 answer
777 views

I am trying to make a collection view of images, so that there are 3 per row, with some spacing in between. Code:- func setupCollectioView(){ guard let collectionView = gridPhotosCollectionview, ...
Sham Dhiman's user avatar
  • 1,596
0 votes
2 answers
1k views

I am currently using Kingfisher library to load thumbnail images for collectionview cells and if it is already recorded in the cache, it would load from the cache. Seldomly some images are loaded for ...
Runnan's user avatar
  • 7
0 votes
1 answer
99 views

Some odd behaviour. Got a UITableview with dynamic custom cell. As part of the custom cell is a UIStackView which contains a dynamic number of buttons. These display as expected. See image 1 However, ...
Nicholas Farmer's user avatar
0 votes
0 answers
193 views

I have a banner view that shows 3 images. The image is currently cropped so that it would fit in the bannerView. I tried changing the content mpde of the imageView, but none of it works. I tried ...
Shana's user avatar
  • 41
-1 votes
1 answer
78 views

I have a horizontal UICollectionView with custom UICollectionViewCell with UILabel -which I've built with the interface builder storyboard + xib file for the cell) I want to have some space between ...
Aviram Netanel's user avatar
0 votes
1 answer
324 views

I have a vertical UICollectionView and when I scroll I want the first cell to be slightly larger than the others. This code partially solves my problem... However, when I scroll to the end of the list,...
Gucci's user avatar
  • 159

1
2 3 4 5
90