Questions tagged [collectionview]

The Marionette CollectionView displays a Backbone collection object by rendering each objects through the specified childView View object.

Docs

1294 questions
0
votes
0 answers

TapGestureRecognizer doesn't work for view inside CollectionViewCell

I have the UIView that contains tapGestureRezognizer. This view is added inside UIView in UICollectionViewCell (@IBOutlet weak var addViewContainer: UIView!) And then I'm filing the cell and placing this AddStoreView inside the cell (AddStoreView…
0
votes
1 answer

Custom CollectionView Layout

I want to make a custom cell like this: Here is my code: import UIKit class ViewController: UIViewController, UICollectionViewDelegateFlowLayout, UICollectionViewDataSource { @IBOutlet var collectionView: UICollectionView! override func…
Twitter khuong291
  • 11,328
  • 15
  • 80
  • 116
0
votes
1 answer

How to make cells fit Collection View

I custom collection view cell by cell' size. In case I have 1 or 2 cell, it works perfectly, but when I have 3 cells, it doesn't work well. Here is my code in case I have 3 cells: case 3: let lastPhoto = info.albumOtherPhoto.photos.first let…
Twitter khuong291
  • 11,328
  • 15
  • 80
  • 116
0
votes
0 answers

Always an error when trying to add a @IBOutlet for xib file

I'm trying to do something quite simple, actually I have just started a new project and I have added a button in the main view of the Storyboard. Then when I click on this button, it just load a new view which is in my xib file. For that, I use this…
Adz
  • 281
  • 3
  • 16
0
votes
1 answer

How to programmatically change the UICollectionView Cell location

How to change spacing between the navigation bar and the first collectionViewCell? I want to be aligned in the middle. In this case, the only way to calculate the screen size?
Michael Park
  • 105
  • 1
  • 2
  • 5
0
votes
1 answer

When I scroll horizontally through my collection view, the whole view reloads starting the animation again

When I move the collection view across the screen, the whole view controller reloads again. This means that all the animations which occurred previously has to happen again. Is there a way to stop the view controller reloading when the collection…
Pete
  • 84
  • 10
0
votes
2 answers

Swift 2.0: Collection view with different cell widths

I have a simple collection view on a ViewController. It is a single, horizontally-scrolling strip. There are unlimited number of cells that will either be of type A or B. Each class of cell has a different width (A=160, B=40). So the collection…
RobertyBob
  • 803
  • 1
  • 8
  • 20
0
votes
1 answer

Swift collectionView select cell multiple selection

I have a UICollectionView with 2 sections. I want to select the cell when the user taps on it. My code runs correctly every time a user taps on the cell, the cell become smaller and a checkmark appears in it ( it's the imageView I add as subview of…
MarcoCarnevali
  • 671
  • 8
  • 23
0
votes
1 answer

Button click method is not working in collection view

I am creating a camera app. I am showing captured pictures in collection view. I placed a button to delete the particular picture. While running I am able to see the button to delete, but if I click the button it is not performing any…
0
votes
1 answer

CollectionView with different number of items, items should fill the collection view

I have a scenario that I have X Labels (or Buttons). They should appear in a horizontal collection view. There shouldn't be scrollable. The thing is that the number of lables/buttons can change (0-5). The perfect thing would be to use a StackView…
kuzdu
  • 7,124
  • 1
  • 51
  • 69
0
votes
1 answer

Fatal error: Array index out of range. About a collectionView

The controller has a collectionView, including 1 cell, 5 section and some row, downloading data from LeanCloud just like Parse. Code always fails with fatal error: Array index out of range. In my opinion, I may have some problem in dealing with…
0
votes
0 answers

How can I have a UICollectionview 1 row and cell vertically and horizontally?

When I have my telephone in vertical, perfect I have one cell under other under other (....) but when I put my telephone in horizontal I have this problem: So, how can I put a cell per one row when I put my telephone in horizontal?.
Rachel
  • 1
0
votes
2 answers

Bug: my UILabel displays on a single cell, how to fix?

My UILabel appears on some cell and times when I scroll my UICollectionView others appear on the cell but not all, how to fix? Thank you This label mixes with the same label other cell // cellForItemAtIndexPath self.date = [NSDate…
victor bill
  • 209
  • 2
  • 15
0
votes
1 answer

Cell hidden bug

I try to hide my cell id in the match @ "56eae83ae3c9a04d398b4582", it works fine except that when I scroll I have other cell of my UICollectionView hiding, an idea? Thank you cell.statusContest.text = [searchResult objectForKey:@"id"]; …
victor bill
  • 209
  • 2
  • 15
0
votes
1 answer

Issue with JSQMessages Displaying Test Messages

When I add multiple test messages, only two of them are displaying on screen. The other messages are clearly there because I can copy them, but the colors are simply not showing. When I scroll around, a new two texts appear, but it is still only…
Sampath Duddu
  • 277
  • 1
  • 5
  • 14