UICollectionViewCell is a class from UIKit framework in iOS. A UICollectionViewCell object presents the content for a single data item when that item is within the collection view’s visible bounds. Available in iOS 6.0 and later which is inherited from ...

learn more… | top users | synonyms

3
votes
5answers
559 views

caching images in collectionViewCell in Swift?

I have images in my collectionViewCell's that are fetched and parsed via NSURLRequest, how do I cache these images so they don't have to start a new request with every single appearance/disappearance ...
9
votes
4answers
4k views

Could not cast value of type 'UICollectionViewCell'

I use a custom CollectionViewCell in my Storyboard. When I start the app I get this message: Could not cast value of type 'UICollectionViewCell' to TestProject.CollectionViewCell.
0
votes
3answers
33 views

cellForItemAtIndexPath indexPath not called for multiple collection views in a single UIViewController

I am trying to have multiple collection views in a single view controller. I have tried to achieve that by using separate tags for each collection views, but it seems to me that the ...
1
vote
0answers
25 views

CollectionView doesn't show images

Helllo there! I'm working on a project where you can put a pin on a map, tap the pin and see a collection view with Flickr images associated with the location. Everything works fine instead of ...
0
votes
2answers
3k views

How to select item in collectionview programmatically?

I have a UICollectionView. The UICollectionView's datasource is a NSArray of students (from CoreData). I want the current student item be selected/highlighted. How can I do this? I know there is a ...
0
votes
2answers
26 views

Swift 3 - UICollectionView - Select first cell as View Will Appear

In my collection view I need to select the first cell as soon as the view appear. I have implemented didSelectItemAtIndexPath and didDeselectItemAtIndexPath When the cell is selected it shows a green ...
5
votes
5answers
19k views

Specify row and column number for UICollectionView

I want to show a UICollectionView which contains exactly 2 rows and 100 cells in each row. // 1 - (NSInteger)collectionView:(UICollectionView *)view numberOfItemsInSection:(NSInteger)section { ...
1
vote
1answer
32 views

Swiping left to create a new collectionViewCell

I'm trying to implement a smoother way for a use to add new collectionViewCells for myCollectionView (which only shows one cell at a time). I want it to be something like when the user swipes left and ...
0
votes
3answers
88 views

How I could make this animation in a UICollectionViewCell when tapped?

I 'm trying to do a similar animation which make these UICollectionViewCell when you select one. I mean the fact they do as if they get up , but nose how to get to get it . I clearly should be done in ...
0
votes
1answer
30 views

Second UICollectionCell prototype is not displayed, what's wrong doing with the storyboard?

I am learning the examples of UICollectionView from the book: 'iOS7, Push the limit', chapter 5, 'Get a Handle on Collection Views'. By following the book, I created a second UICollectionCell ...
1
vote
0answers
152 views

How to drag and drop collection view cell from 1 to another uicollectionview

Here the scenario. I have a UITableView With Multiple Section. Each Section Contains exact 1 row. And each row contains a UICollectionView. ---------------------------------- TablViewSection 1 ...
1
vote
1answer
12 views

UICollectionView Wrap Cell around Label

I need to be able to wrap a UICollectionViewCell around a Label (with some padding). Basically, I'm looking for something like this (this is done on Android, without much hassle): This is what I ...
0
votes
1answer
26 views

UICollectionView layout with custom layout

Is it possible to create a collection view with an item on the left and two items stacked to the right of it? Whenever I specify the correct sizes to do this in the sizeForItemAtIndexPath delegate I ...
11
votes
1answer
3k views

UICollectionViewCell dynamic sizing for 4.4 and 5.5 inch

I have UICollectionView with cells in the storyboard. The size of each cell is set to 145x145. They look good on the iPhone 4 - 5s, but the size doesn't increase proportionally on the iPhone 6 and ...
0
votes
1answer
28 views

Dynamic UICollectionViewCell width with respect to frame width and aspect ratio

This is a follow up question from UICollectionViewCell dynamic sizing for 4.4 and 5.5 inch While that solution is great, I'd like to generate a dynamic amount of item cells (kCellsPerRow) within the ...
1
vote
1answer
51 views

How to design custom collection view programatically?

In my project I want to design custom View Cell programatically with SVGKImageView & UILabel like this here square is an SVGKImageView & "Dadar" is an UILabel. But now I am getting output ...
-1
votes
0answers
12 views

Looking for ideas how to do advenced UICollectionView cell animation

I've seen many very nice looking animations on UICollectionView cells, and I'm looking for some open source example or ideas how it's done here. I know that when I tap cell I have to start animating ...
1
vote
1answer
37 views

label override in uicollectionview in Objective C

Please help ... this code is over ride the label .... cellForItemAtIndexPath static NSString *identifier = @"cellIdentifier"; [self.mycollectionViewOutlet registerClass:[UICollectionViewCell ...
0
votes
1answer
18 views

UICollectionView Not Updated with custom UIViewController

I created a custom UIViewController and extended it to implement: UICollectionViewDataSource, UICollectionViewDelegate. In story board, I added UICollectionView and made reference from my controller ...
0
votes
0answers
12 views

Adding new data to the top of a UICollectionView without animation

I have a UICollectionView that is displaying data that has been saved locally to the device. Once this data is shown, I call to the server to retrieve any new data. If the server has new data, I need ...
0
votes
2answers
798 views

Using a UICollectionView to build a Monthly/Weekly calendar

I want to build a calendar using a UICollectionView. The calendar should have two layouts: Weekly - 7 days with paging. Should be horizontally scrollable. Monthly - full month with paging. Should be ...
0
votes
0answers
26 views

How to rotate CollectionView Cell so item stays centered?

I have a UIcollectionView in an iPad app set up to display one photo at a time. When I rotate the from an image in Landscape I'd like to have the image resize so that the image shown when the rotation ...
0
votes
1answer
25 views

Access UICollectionView cells in ViewController

I have added some buttons to a UICollectionView like so in the storyboard: When I build the app, I don't see anything in the UICollectionView. Why is this? I want to have only 5 buttons in there ...
2
votes
2answers
56 views

Unable to load locally stored images faster into collection view.?

I have a multiple images and video stored in application document directory. I am displaying that images and videos in collection view using SDWebImage in this way. -(UICollectionViewCell ...
0
votes
0answers
13 views

Demonstration Cells in UICollectionView

I would like to make a UICollectionView with Demonstration Cells so it looks very good. It´s show for the first like in the Picture just without the Camera Cell so is´t shows only the Demonstration ...
1
vote
0answers
18 views

Setting ContentOffset in a UIScrollView within UICollectionViewCell

I am working on a horizontally-scrolling UICollectionView with cells that each have a vertically-scrolling UIScrollView inside of them. They are working great, however I would like the UIScrollViews' ...
0
votes
2answers
90 views

Showing Cells in UICollectionViewController

I have tried to make a UICollectionViewController where I can show a image for each cell. When I want to open this ViewController it shows me an error import UIKit private let reuseIdentifier = ...
0
votes
1answer
20 views

Save Data always in the first Cell UICollectionView

I have a UICollectionView and i want to save the data (images) always in the first cell and the old data walks to the next cells. So when i save a new photo it´s comes in the first cell, i have tried ...
-1
votes
0answers
14 views

UICollectionView Custom Cell not showing up in tvOS swift [Latest]

I am trying to produce a custom layout for my app. I am trying to start the app with the cell in the middle and each cell followed by that cell and any cell which is in focus should come in the middle ...
0
votes
0answers
12 views

UICollectionView cell selection issue - only cells on the visible area when view is loaded can not be selected

I am trying to use UICollectionView to develop a day calendar for my app. ScreenShot of my day calendar.The view contain 00:00 to 24:00 is developed by collection view. In the bottom is a tableview ...
0
votes
0answers
17 views

Updating the constraint of a cell's subview

I have a UICollectionViewCell subclass that contains 2 subviews, a UIImageView and a UILabel. The UIImageView has a leading constraint constant value of 29 to the cell. I need to modify this leading ...
0
votes
0answers
18 views

UICollectionView have prototyp cells

I have a CollectionView and i would to have at first in the view Prototyp cells because it´s looks good. So i have nothing found so i ask this Question here. They cell are only for the first than it´s ...
0
votes
1answer
44 views

NSRangeException when deleting last UICollectionViewCell

I have a UICollectionView with 1 section. The user can delete cells from the collection, and I use this code for removal: [self.collectionView performBatchUpdates:^{ [self.collectionView ...
0
votes
1answer
15 views

Unwanted space between UICollectionViewCell

I've got a UICollectionView, and have a custom UICollectionTableViewCell with a UIImageViewInside. I've got the spacings as followed: #pragma mark - UICollectionViewDelegate - ...
0
votes
1answer
18 views

Overriding UIPanGestureRecognizer for UICollectionView

Having some issues getting this to override its superclass - keep getting the error "method does not override any method from its superclass". The collection view and the pan is all set-up, I just ...
1
vote
3answers
2k views

UICollectionViewCell reuse

There is any code like this one that work with UICollectionViewCell when the method reuse ? - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath ...
0
votes
1answer
44 views

i want add animation to uicollectionview while scrolling uicollectionview.i want to add animation Depth Page transform on iOS

i want to make collection view cell full screen and want to have animation like android depth page transfer.Animation must be like stack in while scrolling up and stack down while scroll up. func ...
0
votes
1answer
42 views

How to show check mark in Collection view Using Swift language

In Table view we can put check Mark Easily on cells. But in Collection View how can put Check mark ,when We select a cell ? Anyone Please help. Thanks
0
votes
0answers
19 views

UICollectionViewCell transform animations reset on custom Interactive UIViewController transition

I have a UICollectionView with 3 items on each row. At awakeFromNib I begin animating each cell to move around in random directions at random speeds within a certain radius. I'm using ...
7
votes
2answers
11k views

How to select some items in the UICollectionView after it first load?

I tried to write [self collectionView:myCollectionView didSelectItemAtIndexPath:selectedIndexPath] and UICollectionViewCell's selected=YES in viewDidLoad, and it did implemented the method ...
0
votes
0answers
35 views

UICollectionView item size issue

I have set the item size in sizeForItemAtIndexPath method of flow layout as below let itemSize = (self.collectionView.frame.size.width / 7) return CGSizeMake(itemSize, itemSize) But, it shows a ...
1
vote
1answer
275 views

How can I toggle between 2 different UICollectionViewFlowLayout instances?

Been working on this for a few days now. I'm trying to allow customers of an app to switch between 2 display types when shopping. Right now I'm using 2 UICollectionView's with their own custom ...
0
votes
1answer
20 views

Cell not displayed in collection view instantiated from storyboard (not embedded)

In the below scenario, I cannot get even the cell background (black) to show. In a storyboard, I've a container with an embedded custom UICollectionView with a custom UICollectionViewCell with an ...
0
votes
0answers
29 views

UICollectionview scroll fast view blur swift

I am using UICollectionView to download and play video. It's working good. My problem is when i scroll collection view fast view mismatch Example i have collection view which contains 10 cells. ...
0
votes
2answers
65 views

Add UILabels programmatically to a Collection Cell, swift

I am trying to add UILabels in the subView of my Collection Cell. But when I scroll to the other cell and come back all the UIlabels appear on both cells and some are written under the other.. I ...
4
votes
3answers
5k views

the behavior of the UICollectionViewFlowLayout is not defined, because the cell width is greater than collectionView width

2015-08-18 16:07:51.523 Example[16070:269647] the behavior of the UICollectionViewFlowLayout is not defined because: 2015-08-18 16:07:51.523 Example[16070:269647] the item width must be less ...
0
votes
1answer
211 views

Opaque UILabel in a UICollectionViewCell has strange rendering behavior

I've experienced some really weird behavior with UILabels in a UICollectionViewCell today and I'm hoping one of you guys can shed a light on this. I can't show you code or full screenshots, but I ...
12
votes
5answers
17k views

How to delete an item from UICollectionView with indexpath.row

I have a collection view,and I tried to delete a cell from collection view on didSelect method.I succeeded in that using the following method [colleVIew deleteItemsAtIndexPaths:[NSArray ...
68
votes
9answers
29k views

UICollectionView flowLayout not wrapping cells correctly (iOS)

I have a UICollectionView with a FLowLayout. It will work as I expect most of the time, but every now and then one of the cells does not wrap properly. For example, the the cell that should be on in ...
7
votes
1answer
73 views

How to wrap self sizing UICollectionViewCell

My goal is to have a Swift implementation of a UICollectionView with dynamic content where each cell hold parts of a sentence. Each part of the sentence can be edited by the user. The problem is that ...