Category "uicollectionview"

Diffable Data Source with a custom collection view layout?

Here I have created a sample app that uses diffable data source for a collection view with a custom collection view layout. The specific layout I am using is fr

Detect userEvent/pan/scroll on orthogonal sections in UICollectionViewCompositionalLayout

I am using autoScroll on an orthogonal section of the collectionView using compositional layout. I need to invalidate the autoscroll timer as soon as the user m

UICollection View "Reload Data" After Scrolling Crash

I have made a collection view with cells arranged in rows in columns using a great tutorial. I have added a button to a toolbar in the main view controller tha

CollectionView Cell inside UITableView is not scrolling horizontally for Voice Over accessibility

In my app, I have a screen where I need to support voice over accessibility. The screen has a TableView and inside that a collectionView. When voice over is ON

How can I detect orthogonal scroll events when using `UICollectionViewCompositionalLayout`?

In the video Advances in Collection View Layout - WWDC 2019, Apple introduces a new 'orthogonal scrolling behavior' feature. I have a view controller almost ide

UICollectionView error: cells must be retrieved by calling -: -dequeueReusableCellWithReuseIdentifier:forIndexPath:

In my project I have multiple types of UITableview cell each containing UICollectionview. Initially I loaded 2 tableViewcell in 2 sections of UITableview. At

iOS - Change UICollectionView layout to fill rows instead of columns

Is it possible to change the UICollectionView so that it fills the rows instead of the columns ? Here's an image explaining it : EDIT : It's an horizontal scro

CollectionView Disappears within StackView (Swift)

I'm trying to achieve the stackView arrangement shown in the middle of this figure:, but for some reason the top stack, containing a collectionView, disappears

Toggle select / deselect state of a UICollectionView Cell on tap - Swift

So first of all i've been stuck on this for a few days and spent a full day reading and trying many options on Stack Overflow already but non to my success Wha

ARKit -[UIView setAnimationsEnabled:] Performing any operation from a background thread on UIView or a subclass is not supported

I have a ViewController that has a collectionView inside of it. I display the contents of the collectionView's cells inside an ARSCNView. When I set the ViewCo

How can I have onclick functionality for my CollectionView cells?

I want to make it so that when I tap on a CollectionView Cell, it segues to another view. I also want to pass a user ID to this view so I can query the database

CollectionView move to next cell automatically swift

I am trying to create horizontal slider like Flipkart. I am using collectionView with Horizontal scrolling and paging. Cell contains imageView. I am succeed in

Animating CollectionView cells like iOS Photos app Years/Months/Days picker?

I can't understand what Apple is using here in the iOS Photos collection view. How do they transition the collection view when using the Years / Months / Days /

UICollectionView display 3 items per row

I have a UICollectionView created from storyboard, I want to have 3 items per row in the view. I managed to do that using the following: - (CGSize)collect

How to animate collection view layout change while using `layoutAttributesForElements`?

I made a custom collection view flow layout that can toggle (with animation) between "film-strip" and "list" layouts. But after adding some fancy animations to

Snap to center of a cell when scrolling UICollectionView horizontally

I know some people have asked this question before but they were all about UITableViews or UIScrollViews and I couldn't get the accepted solution to work for me

UICollectionView not calling moveItemAt:To: Data Source method in response to endInteractiveMovement()

I'm having a difficult time getting interactive reordering to work in a UICollectionView embedded in a subclassed UIViewController. There is no custom layout ob

Horizontal scroll UICollectionView has additional line spacing?

I'm trying to use UICollectionView to make a table, when I set it to vertical scroll, everything is working great. But when I set it to horizontal scroll, it a

Why UICollectionView didSelect method does not work?

I've created my UICollectionView programmatically and in this case my didSelectItemAtIndexPath method does not call at all. let collectionView = UICollectionVi

iOS 15 UICollectionView issue for UICollectionViewRecursion

The application is working fine till Xcode 12 and iOS 14 but as soon as I upgraded to Xcode 13 / iOS 15 my application stoped working with below error log 2021-