uicollectionview

UICollection View - Segue - did select specific cell , LOG

流过昼夜 提交于 2020-01-01 05:44:23
问题 I am starting to use a UICOllectionview to load a custom made photo album, the album loads just fine, and the data is coming from my server (SQL-JSON-NSARRAY-NSDictionary) and been populated in the cell's just fine, However now I would like it when the user selects that cell to load a new UIVIewController with that image in full size (so they can view/print/share etc) However I am getting stuck in the 'prepare for segue' method, as I cannot pull any information from that specific cell as a

Nightmare with performBatchUpdates crash

一个人想着一个人 提交于 2020-01-01 04:31:08
问题 I am facing a nightmare of a crash during performBatchUpdates on a collection view . The problem is basically this: I have a lot of images on a directory on a server. I want to show the thumbnails of those files on a collection view . But the thumbnail have to be downloaded from the server asynchronously . As they arrive they will be inserted on the collection view using something like this: dispatch_async(dispatch_get_main_queue(), ^{ [self.collectionView performBatchUpdates:^{ if

UICollectionView how to deselect all

让人想犯罪 __ 提交于 2020-01-01 04:23:06
问题 I have a FollowVC and FollowCell Setup with collection View. I can display all the datas correctly into my uIcollection view cell using the following code with no problem. func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { if let cell = collectionView.dequeueReusableCellWithReuseIdentifier("FollowCell", forIndexPath: indexPath) as? FollowCell { let post = posts[indexPath.row] cell.configureCell(post, img: img) if cell

How can I add a search bar above a UICollectionView?

╄→尐↘猪︶ㄣ 提交于 2020-01-01 04:22:08
问题 I would like to allow users of my app to search for images using a UISearchBar above a UICollectionView . According to my understanding, a UICollectionView must be in a UICollectionViewController to work properly. However, Xcode won't let me put a search bar in a UICollectionViewController . I also can't use a generic UIViewController as the collection view won't work properly. How can I achieve the functionality that I want? 回答1: CollectionView + SearchBar with Swift3 + Storyboard

iOS 8 GM does not update constraints on collection views

冷暖自知 提交于 2020-01-01 04:13:09
问题 In Xcode 6 Beta 7 and all versions before it, I had a collection view that would update its constraints on its cells when an iPad would rotate between landscape and portrait. Now, it doesn't update at all, and in fact it looks exactly like how I leave it in the XIB, which implies to me that it's not updating at all. It appears that the reusable views I'm using are updating correctly, but the cells certainly are not. Has anyone else run into this issue yet? Anyone have any ideas for how to get

Designing UICollectionView cells in nib with Interface Builder (without storyboard)

喜夏-厌秋 提交于 2020-01-01 03:52:26
问题 I am trying to design a custom UICollectionViewCell prototype (in Xcode 5.0.2), however Interface Builder doesn't let me add a cell to my UICollectionView while designing a nib. I can set the number of items (cells) and Interface Builder creates and displays cells perfectly if I'm using storyboard, but I can't add a cell to my collection view in a nib. I've tried: Drag and dropping collection view cell into collection view manually from the object library. (fails: doesn't let me drop the cell

How can I set the entire header view to UICollectionView?

女生的网名这么多〃 提交于 2020-01-01 03:02:27
问题 I want to set the header to collection view, just like UITableViewController's setTableHeader does. I found the way to set the each section's header on collection view, but I couldn't find how to set the header view of the entire header. Apple's reference of UICollectionViewLayout says "Supplementary views present data but are different than cells. Unlike cells, supplementary views cannot be selected by the user. Instead, you use supplementary views to implement things like header and footer

iOS Android Material Design Hierarchical Timing using UICollectionView

时光总嘲笑我的痴心妄想 提交于 2020-01-01 02:32:11
问题 I want to do the animation introduced by Android Material Design Hierarchical Timing in iOS using UICollectionView Lets say its a collectionView, and resizing the view is not an issue, what would be the best practice to do this animation in that timely fashion. How to perform the delay 回答1: One way to do this would be to add the cells one at a time with a timer, and have those cells expand to full size as they come on to the window. #import "ViewController.h" #import "RDCollectionViewCell.h"

UICollectionView selectItemAtIndexPath doesn't call didSelectItemAtIndexPath

不问归期 提交于 2020-01-01 02:06:09
问题 I have a collection view. I would like to programmatically select a cell. This is the code I use [_collectionView selectItemAtIndexPath:[NSIndexPath indexPathForItem:currentSelectedVideo inSection:0] animated:YES scrollPosition:UICollectionViewScrollPositionNone]; For some reason the functions: -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath -(void)collectionView:(UICollectionView *)collectionView didDeselectItemAtIndexPath:

How to scroll UICollectionViewCell programmatically in IOS?

本秂侑毒 提交于 2019-12-31 16:11:14
问题 I have a vertical UICollectionView with each cell taking up the entire self.view.frame I can easily swipe upwards to page to the next cell, but I would like to do the same thing with the press of a button. I've tried using: - (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated And: - (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated They work but they temporarily "White-Out" the currentCell to present the nextCell, while the swiping shows both cells during the