Skip to main content

All Questions

0 votes
2 answers
78 views

collectionView "scrollToItem" after check for "dataSource?.collectionView(self, cellForItemAt:" functions on iOS 18 leads to a crash

I have this extension to scroll to the first collectionView cell: extension UICollectionView { func scrollToFirst(inSection: Int = 0, animated: Bool = false) { if let _ = dataSource?....
Ahmadreza's user avatar
  • 7,238
1 vote
1 answer
71 views

Can't scroll properly using UICollectionViewCompositionalLayout and nested group

Here's the layout I'm trying to achieve. I'm trying to achieve a 2 rows by x items grid using compositional layout. Each row is a group that contains x items align horizontally. Both row groups are ...
iDev's user avatar
  • 514
0 votes
0 answers
338 views

How to pin an UICollectionViewCompositionalLayout section

I have a CollectionView and I'm using UICollectionViewCompositionalLayout to manage its layout. I have 6 sections, and each one can make horizontal scroll. I navigate on CollectionView scrolling ...
Victor's user avatar
  • 9
1 vote
1 answer
50 views

Creating a custom collectionView that overlays the cells

I am playing around with collectionViews, trying to create a custom design for image layout. See below: I have achieved this. I know the code isn't the most beautiful or regular, however I am ...
OnlyDans's user avatar
0 votes
1 answer
827 views

How do you extend the height of a collection view and not have scrolling, but have scrolling on the outside view?

Right now, I have a collection view with scrolling inside a view. I'd like the collection view's height to expand downward depending on how much content it has and not have any scrolling. A user would ...
sschwab's user avatar
  • 13
-1 votes
1 answer
940 views

Keep the cells in the same position after scrolling down a collectionView

I have a chat and when i scroll down to fetch older messages i want the collectionView to stay still and allow the user to manually scroll the older message who just loaded like in messenger. With my ...
dodo's user avatar
  • 67
-1 votes
1 answer
472 views

Scroll all collection view cell inside table view

I have collection view inside a table view. It looks like a spreadsheet: Collection view scrolls horizontally and table view vertically. I want all the collection view to scroll at once. Can anyone ...
Sptibo 's user avatar
  • 283
0 votes
0 answers
58 views

Adding view to UICollectionview without moving collection view

So I have a collection view with a Tableview inside it. Clicking one of the tableview cells will bring up a sort of basket on top of the collection view. You can click a maximum of 4 items. This will ...
Mr_Bull3t's user avatar
  • 107
0 votes
1 answer
921 views

Scrolling collectionview inside scrollview also scrolls scrollview

I am making weather app. I can swap between different locations using collectionview with enabled paging. Inside every page there is view with another collectionview where it shows weather for ...
dandand's user avatar
0 votes
0 answers
317 views

Selecting cells in collectionView(_:cellForItemAt:) makes the scroll to decelerate instantly

Context: I am building a collection viewing which when the user presses the header of a section it selects all the cells in that section. In addition, the section can have many items that will be ...
iDev's user avatar
  • 514
1 vote
1 answer
1k views

How to create a slow and continuous scroll with CollectionView Swift

So I have some info that I would like to display in a horizontal CollectionView that scrolls automatically without user interaction. Like those bars under news channels that display info. I have the ...
Mr_Bull3t's user avatar
  • 107
0 votes
1 answer
273 views

UICollectionview: Grey Bar on safe Area on scroll to the top

I hope you are having a great start to your week! On scrolling up the UICollectionView, a grey bar shows up at the bottom covering the bottom uiView. It goes away when I scroll down. I have looked at ...
EarlyEdCoder's user avatar
0 votes
0 answers
81 views

Collection view image loaded from document directory lags when scrolled

I am retrieving data from Document directory to populate collection view cell which contains an image and label. While the data loads, but scrolling isnt smooth. How to enable prefetching while ...
vijay balaji's user avatar
0 votes
0 answers
445 views

Instagram like Profile Page iOS Swift

I'm trying to make Instagram profile page like scrolling Basically it's scrolling whole page, The top is a header, and there is a segment controller and then there are collection view. I'm trying to ...
Vikash Lal Dodani's user avatar
2 votes
0 answers
293 views

CollectionView content offset changes when reload it on last item for Pagination

I am trying to implement pagination in CollectionView which contains three items in a row. For that I used:- func scrollViewDidScroll(_ scrollView: UIScrollView) { if (scrollView.contentOffset....
Piyush Naredi's user avatar

15 30 50 per page
1
2 3 4 5
10