In this UICollectionView tutorial, you'll get learn how to leverage the superpowers of the only view capable of dethroning UITableView as the king of UIKit.
I found one typo/mistake error in the tutorial, and just want to let you know it.
At UICollectionViewDataSource section in the tutorial when creating a black placeholder collection view cell, the return cell from dequeueReusableCell(withReuseIdentifier:for:) method is casted as FlickrPhotoCell. But I think the cell should be returned as just UICollectionViewCell as it is. I think it is just a typo or mistake error.
Hello, why not make a simple tutorial with photos of our assets and make an optional part of the link with Flickr. When we learn not do it the basics and then for those who are interested to examples such as with Flickr.
I learned a lot from this tutorial, thank you! And everything worked great for me the first time through. I just want to contribute two remarks about the function that returns the FlickrPhoto in the private extension.
I think that naming the function photo(for indexPath: IndexPath) -> FlickrPhoto keeps better with the spirit of Swift 3 API naming guidelines. Then at the call site it looks like let flickrPhoto = photo(for: indexPath) without repeating indexPath so often.
I donât understand why indexPath is being cast to NSIndexPath. It works for me just to write searches[indexPath.section].searchResults[indexPath.row]
I get two errors, one at that line (Type âFlickrPhotosViewControllerâ does not conform to protocol âNSObjectProtocolâ) and the other at the line just below //4,
self.collectionView?.reloadData()
That error says, Value of type âFlickrPhotosViewControllerâ has no member âcollectionViewâ
Not sure what Iâve botched to get these errors at this point. Help??
This is probably something really simple, but Iâve been stuck on it for hours⊠How do I get the Flickr classes we downloaded to show up in the file tree in XCode? I have unzipped them and moved them into the appropriate folder, but they donât show up and I donât have access to the classes in the code.
Bradley, i am getting the following error: Terminating app due to uncaught exception âNSInternalInconsistencyExceptionâ, reason: âcould not dequeue a view of kind: UICollectionElementKindCell with identifier FlickrCell - must register a nib or a class for the identifier or connect a prototype cell in a storyboardâ
it happened as soon as I added the UICollectionViewDelegateFlowLayout extension
searches[(indexPath as NSIndexPath).section].searchResults[(indexPath as IndexPath).row]
in this line of code , showing use of unresolved identifier searches
Hi, I actually made use of the Flickr API in a free tourism/travel app that I made about Korea. However, since the images are downloaded asynchronously via a completion handler, it takes a long time to load the images. Anyways, the app is free, here is the link to the AppStore homepage if you are interested: https://itunes.apple.com/us/app/seoul-tourism-aid/id1254856154?mt=8
Do you know of any way to download the images incrementally? In another portion of the app, I used CloudKit to download images, which I was able to do one-by-one via a pointer. The download time is still slower than Iâd like, but at least the user experience is better, since the images are loading one by one, as opposed to all at once, as is the case with the Flickr portion of the app, where, unless you have a superfast connection speed, it takes patience for the user to see the final images.
Who has a problem in Xcode
"Could not cast value of type âUICollectionViewCellâ (0x110460820) to '******.cell
You need to remove this line of code from viewDidLoad()
self.collectionView!.registerClass(UICollectionViewCell.self, forCellWithReuseIdentifier: reuseIdentifier)