1,494 questions
0
votes
0
answers
32
views
Collection View Layout Incorrectly Updates with Navigation Bar
In MemoryViewController I am setting up the collectionView layout in setup(), but this occurs before the view's insets have been set, including the required spaces for the navigationController. ...
0
votes
0
answers
61
views
Custom UICollectionViewFlowLayout With Half Circle
I want to use UICollection to display the cards. Each card is a cell; maybe it needs a custom UICollectionViewFlowLayout. How can I do this?
This is my code, But it can not switch cards.
I log self....
0
votes
1
answer
167
views
Is there any way to using UICollectionViewCell's self-sizing only in vertical direction?
I am writing a demo about the difference using compositional layout & traditional flow layout with UICollectionView.
I found that if I want to set the cell’s width equal to the UICollectionView’s ...
0
votes
1
answer
88
views
can UICollectionLayoutListConfiguration support footer view like tableFooterView not like section footer view?
I am using UICollectionLayoutListConfiguration to make a UICollectionView layout like UITableView.
But it seem like the only supported footer view mode in UICollectionLayoutListConfiguration is ...
0
votes
1
answer
172
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 ...
1
vote
1
answer
101
views
Full width UICollectionViewCells overlap during interface orientation rotations causing ugly animation
Preface
I'll preface this illustrating the issue visually. Here's a video of the issue: upon rotating the interface, the UICollectionViewCells overlap, generating an unpleasant animation that for sure ...
1
vote
0
answers
98
views
How to create Horizontal swipe card, Right card swipe remove card and left swipe card index append in UIkit
class SwipeCardComponentVC: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate {
@IBOutlet weak var collectionView: UICollectionView!
var dataSource = ["Card ...
1
vote
0
answers
41
views
UICollectionView: Temporarily focus on subset of items, like iMessage threads or SpringBoard folders
I'm trying to achieve a collection layout where I can focus on a subset of items, visually pulling them out like Apple does with iMessage threads or folders on the SpringBoard. It's important that I ...
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
0
answers
118
views
How can I ensure uniform item widths across a group of same column in a table in a CollectionViewComposite layout?
Now I want to show table with N number of rows and N number of columns with both directional scrolling.
Constraints
By using compositional layout, we need to design a table structured collectionView. ...
0
votes
2
answers
360
views
UICollectionView layout API for collapsing/stacking grid items
I'm trying to achieve a UICollectionView layout that works like a flow layout, but can conditionally stack multiple items of the grid into a single cell.
Right now I'm using a helper struct, ...
0
votes
1
answer
96
views
Resizable UICollectionCell by Pan Gesture
I want to resize the collection cell by dragging its edge. What is the best possible way? Currently, I am changing the current cell width manually. but it disrupts other cells and if I invalidate ...
0
votes
1
answer
321
views
Invalid absolute dimension: inf. The dimension must be a finite value
Hi I tried to use compositional layout, while using stage manager rare the app getting crashed. Please refer below error message
Terminating app due to uncaught exception
'...
0
votes
1
answer
172
views
How can I create a freeform drawing board with pan and zoom gestures in Swift using UICollectionView or UIScrollView?
Is it using UICollectionView or UIScrollView?
If using UICollectionView then do we have any sample code to have that zoom in and zoom out.
My requirement is to create a freeform drawing board on which ...
1
vote
2
answers
121
views
How to center spinner style card view in collectionView cell after scrolled?
I have a collectionView scrolling like parallax but it's active visible cell is on top of the previous and the next cell. But, the problem is when I scrolled from first cell (black) to left/right it ...
0
votes
1
answer
324
views
How to resize the first UICollectionView cell on scroll / Swift 5
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,...
0
votes
2
answers
1k
views
UICollectionView: remove separators for specific cells only
I need to show separators for every cell in UICollectionView except every first cell of a section. I'm using list layout.
So far I have only been able to remove all separators using configuration....
1
vote
1
answer
235
views
UICollectionView complex grid again
I can't manage to get this type of layout:
I can only achieve this when I set size of cells in 'sizeForItemAt' method:
I tried solutions from Apple like UICollectionViewCompositionalLayout and ...
0
votes
0
answers
80
views
collectionView height not set According to content Height
how to use two collectionview inside one ViewController with UiCollectionView Height set two fixed height and may varied according to content size ? BY using NSLayoutConstraint in UIKit.please help me ...
0
votes
1
answer
51
views
UICollectionView - How to add "PAGING" in UICollectionView scrolling with vertically
I have implemented UICollectionView with the vertical scrolling and paging, first image showing properly but after scrolling layout get changed.
Code -
// MARK: - UICollectionViewDelegateFlowLayout
...
1
vote
0
answers
31
views
Header section not displaying in collectionview programmatically
import UIKit
class UserProfileController : UICollectionViewController, UICollectionViewDelegateFlowLayout{
override func viewDidLoad() {
super.viewDidLoad()
collectionView?....
0
votes
1
answer
452
views
uiCollectionView inside a uiCollectionViewCell is not scrolling horizontally
Hey Everyone and thank you for taking your time to view this, I am trying to make a uiCollectionView scroll horizontally within a uiCollectionViewCell, the background and elements are showing but im ...
0
votes
2
answers
475
views
Scroll is not smooth when showing long text post in Label cells using CollectionView
i am making app with CollectionView cells using Swift and i fetching posts from my WordPress Website, i want to show posts in CollectionView cell and i want to show full text in Label, but the problem ...
0
votes
1
answer
431
views
Half black screen is visible when device orientation changes from portrait to landscape
I'm using InfiniteCollectionView class, Once I change the device Orientation from portrait to landscape, half the screen looks black for a second
I have also tried the viewWillTransition function by ...
0
votes
2
answers
577
views
Call UICollectionViewDataSource method from UICollectionViewLayout subclass
I'm writing my own UICollectionViewLayout subclass to have full control over the layout and arrangement of my collection view cells. When computing the item sizes, I want the layout to start with the ...
0
votes
1
answer
119
views
Incomprehensible work of the sublayer for cells in the CollectionView. Swift
So, the problem is that the gradient stroke is applied in a way that is not clear to me. At the same time, the problem is only when I do the logic of clicking on the cells as a radio button. If you ...
0
votes
1
answer
147
views
UICollectionView - sizeForItemAtIndexPath not calculated correctly
I'm trying to achieve the following using UICollectionViewFlowLayout:
Somehow the two small pics are not fitting, here's the code:
The code below is in C#, any correct answers in swift will be ...
2
votes
2
answers
1k
views
Build a tags list using UICompositional layout iOS | Remove empty space within groups
I am building a list that contains hashtags using the UICompositionalLayout, I have managed to achieve dynamic-sized cells in my sections using the estimated metrics. Which looks like this
However, I ...
2
votes
1
answer
693
views
Nested collection views with dynamic content
I am using two nested collection views. I have added the ChildCollectionView to the ParentCollectionViewCell, and ChildCollectionView have 3 cells in it but the ParentCollectionViewCell does not ...
0
votes
1
answer
67
views
Swift UICollectionViewCell Item Mixing... Video of the problem is available
My problem video: https://streamable.com/2vrdbu
As you move around the "Collection View" the objects move around and the assignment doesn't work properly.
I tried many methods, but I could ...
1
vote
0
answers
164
views
How to get the "sizeForItemAt" for a UICollectionView, when loading in different sized images
I'm using this library, CHTCollectionViewWaterfallLayout
(https://github.com/chiahsien/CHTCollectionViewWaterfallLayout) to try to replicate a feed that's similar to the Pinterest layout or the Imgur ...
0
votes
1
answer
447
views
UICollectionView inside UIView not working
I'm trying to add UICollectionView inside a UIView. But it's not interacting in any way. DidSelect in not called. Scrolling is not working.
import UIKit
class AddressSelectionView: UIView {
...
0
votes
0
answers
48
views
How can I make dynamic cell width for default layout with horizontal scrolling and equal cell space with leading Swift + iOS? [duplicate]
I am looking a Horizontal Scrolling UICollectionView with 3 rows and dynamic width, cell not align to the left like the image below as android horizontal scrolling :
SetUpCollectionView Code-
func ...
0
votes
1
answer
768
views
Disable dynamic sizing in UICollectionViewFlowLayout
I have a UICollectionViewFlowLayout assigned in UICollectionView. It's delegate method returns fixed CGSize in sizeForItemAtIndexPath. The problem is if UICollectionViewCell contains UIImageView or ...
1
vote
1
answer
41
views
Adding UILabel/UIImageView to UIContentViewCell disturbs it's size
I have a UICollectionViewCell defined in storyboard which has a UILabel added to it's contentView. Collection view uses a flow layout and I return a fixed size of cell in flowlayout delegate as ...
0
votes
0
answers
66
views
How to avoid glitching in collection view cells while dragging the screen
I have a collection view that can be scrolled both horizontally and vertically. I've implemented it using compositional layout. When I make fast dragging actions across the screen vertically / ...
1
vote
1
answer
120
views
How to disable drag space between two collections views in ios
I am using two collectionViews A and B one below the other. (I am using A to display headers and B containing the set of data below the header collection view A).
Now when I scroll the Collection view ...
0
votes
1
answer
180
views
Several animations in a collection view
I'm learning to animate collection views and currently use CollectionViewPagingLayout template.
I want to use not only swipes for navigation in a collection view - but also buttons. And the idea is ...
0
votes
1
answer
64
views
UICollectionView : Cells do not appear/populate
I need some help with a uicollectionview that I've been trying to implement in Objective-C/xcode: I am unable to have the cells appear/populate the collectionview (CV).
Currently I am using the ...
1
vote
0
answers
611
views
UICollectionview with sections side by side in vertical layout
After several days of searching, I give up the search and turn to you. I would like a layout like the one shown in the picture. I don't know what the right way should look like, should I use the flow ...
0
votes
1
answer
946
views
How to make square cells with collection view layout in swift
I'm programming a game with a collection view with 121 buttons (11X11), how can I fix my Collection View cells to be a square? I want to increase or decrease the number of cells so the layout has to ...
0
votes
0
answers
140
views
How to resolve slow scrolling issue in UICollectionView?
Scrolling a collection view with a large number of supplementary header views is extremely slow. The more sections, the worst is the scrolling performance. (Tested with 5,000 sections).
Best to give ...
0
votes
1
answer
2k
views
UICollectionView with Compositional Layout disappears cells with frame still on screen
Trying to get a "sticky header" that will orthogonally scroll with the section, but only partially, leaving the trailing end exposed until scrolled backwards.
Headers don't work as they don'...
0
votes
1
answer
1k
views
Is there a way to give outer border in every section of uicollctionview?
Try to add outer border of every section in a collection view.
If i'm using cell.layer.border, it will also create an inner border. Is there a simple way to create outer border only for every section ...
3
votes
0
answers
356
views
UICollectionViewCompositionLayout with nested groups
I am trying to build a view that list items and each item has subitems which users can scroll through horizontally (orthogonal scroll).
I know this can be done using a tableview and a horizontal ...
5
votes
3
answers
1k
views
Weird delete items animation when using basic UICollectionView with Flow Layout
I ran into a problem when using the simplest UICollectionView and UICollectionViewFlowLayout.
The collection itself works fine, but when the cell is removed, there are problems with the animation.
...
1
vote
1
answer
1k
views
UICollectionViewCompositionalLayout, but not a repeating pattern
Here is the preview of layout
As you can see this layout has a pattern of cells 0, 1, 2, 0, 1, 2, 0, 1, 2 with respect to the size. I want my layout to depict 0, 1, 2, 1, 2, 1, 2, 1, 2 as the pattern ...
0
votes
1
answer
312
views
how can set different height or itemSize for each CollectionViewCell
I have a tableView inside a collectionviewCell and i want to set collectionview cell height as tableview contentSize after tableview loaded data.
if i set itemSize with CollectionViewFlowlayout it's ...
1
vote
2
answers
1k
views
Swift - IOS : How to measure height and width of item from within layout
I have a collectionviewcell with multiple textfields, pictures and labels together. The data is dynamically added, which can have shorter or longer labels and pictures making each cell of ...
0
votes
0
answers
386
views
Custom UICollectionViewLayout, change cell height after image is downloaded inside a cell?
I'm using pinterest tutorial to achieve dynamic cell height according to image's size.
But there is a problem: After it downloaded the data, I send the URL to according cell. When the cell receives ...