Questions tagged [uicollectionviewflowlayout]

209 questions
0
votes
0 answers

displaying collectionView Cells starting from bottom - swift programmatically

I'm trying to display cells in a collection view one in top of the other. the layout I want to achieve is described properly in this delegate layout function: func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout:…
0
votes
1 answer

Open new view after tapping image in UICollectionView

I am fairly new to this and I do not have much knowledge. I followed a tutorial and created the UICollectionView programmatically. Now I want to open a new view with the image that was selected from the UICollectionViewCell. I have attached the…
0
votes
0 answers

How to achieve a dynamic CollectionView Cell Height (Size for item at)?

I have decided start a project with no storyboard for the first time and at the moment I am stuck trying to figuring out how to achieve a proper dynamic cell in my CollectionViewController. Reading some of the solutions here in Stackoverflow I got…
0
votes
0 answers

Collection View Scale Flow Layout

I want to create layout for following layout inside collection view. Align one cell in centre and two cell outside with scale down using transform. I have used third party library DXScaleFlowLayout and implemented following code to make like…
Sagar Chauhan
  • 5,715
  • 2
  • 22
  • 56
0
votes
0 answers

Adabtive Autolayout constrain in UICollectionViewHeader

In UICollectionViewHeader this code resizes everything perfectly when the header is on the screen but if I scroll down (to footer for example) and change orientation while footer is on the screen, the header does not update the constrains and no…
0
votes
0 answers

How to make a UICollectionViewCell with dynamic height for iOS 14

I have a problem resizing the cells of a collection view to fit their content. I have a method that works fine, but with iOS 14 this method fails and no longer works. The code I am using is: In the layout (subclass of UICollectionViewFlowLayout: -…
0
votes
1 answer

errors with UICollectionViewFlowLayout scrolling

I am setting up a UiCollectionView and I am trying to have the view scroll horizontally. The View is setup up and I can see labels and images but it does not scroll at all. The height of the collectionViewCell itself is 350 and how i am setting up…
0
votes
1 answer

Changing the height of a collectionView Cell with animation

The cells with the blue bar are the cell I want to change the height for based on how many green cells there are. Right now I can make the cell change size but looks really choppy I do this by using, func collectionView(_ collectionView:…
0
votes
1 answer

Unable to resize cells with custom UICollectionViewFlowLayout

I'm currently trying to implement custom divider views in between each cell of my collection view. I found this answer online that adds the custom view in the inter-line spacing (link). private let separatorDecorationView = "separator" final class…
kbunarjo
  • 1,277
  • 2
  • 11
  • 27
0
votes
1 answer

Proper way to update collection view cell item from outside of collection view delegate class

I want to hide a view from my visible collection view cell when user finish watching an ad. So in in my userDidEarn delegate method I try to update my visible cell. The delgate is triggered perfectly But somehow it's not hiding the view on my…
0
votes
1 answer

swift - Correct way to pass data to UICollectionViewCell

I'm trying to create my own Book app, and using UICollectionView for listing all the books. Data for each cell is from .plist file, and I'm using custom flowLayout(to make some changes later). So now I'm stucked with delays and lags when scrolling.…
nastassia
  • 807
  • 1
  • 12
  • 31
0
votes
3 answers

iOS UICollectionView Horizontal Scrolling Rectangular Layout with different size of items?

iOS UICollectionView how to Create Horizontal Scrolling rectangular layout with different size of items inside. I want to create a Rectangular layout using UICollectionView like below. how can i achieve? When i scroll horizontally using…
0
votes
1 answer

Why doesn't the UICollectionViewFlowLayout work well?

I would like to use FlowLayout to show two Items in one line by using the following code: override func viewDidLoad() { super.viewDidLoad() setupCV() } func setupCV() { collectionView.delegate = self …
LightOwlGG
  • 139
  • 10
0
votes
2 answers

UICollectionview has unwanted space between sections

I set sections for my horizontal UICollectionView. I want my cell item in second rows in each section to be double width of items in first row. This is what i set: func numberOfSections(in collectionView: UICollectionView) -> Int { return…
0
votes
0 answers

UICollectionView insets / layout

How can I create that layout or I should play with collectionView insets?