UICollectionViewController: SET UP Collection View Controller and Custom Collection View Cell


Welcome to session #1 of Duc’s new Code Mastery show!

In this session, you’ll learn how to use UICollectionView and UICollectionViewController to build a beautiful photos browser app with grid view.

DOWNLOAD starter project: FREE DOWNLOAD:

Code Mastery is hosted by Duc Tran, founder of Developers Academy.

This is his free-style no notes, no teleprompter presentation and live coding broadcast with you guys everyday.

To join Duc’s free courses, register for free at

To subscribe and get free tutorials, courses and weekly content, visit me at:
Connect with Duc on facebook:
Tweet him:
Get daily inspiration:






20 responses to “UICollectionViewController: SET UP Collection View Controller and Custom Collection View Cell”

  1. thuan ho thi Avatar

    có bài về SearchBar không ad?

  2. Oscar Alcaraz Avatar

    One question, I wanna do an ecommerce app, in the scene of products, i wanna load two images from the server per row, Do you recommend me use collection view for this?

  3. selva balasubramanian Avatar


    can you pls tell me….how to return diffrent collection view cell types in a single collection view ??

  4. Tee Vice Avatar

    Really well done tutorial!

  5. Thanh Duy Avatar

    Cảm ơn anh, em đang làm quen với IOS, video của a giúp em rất nhiều

  6. Nizzam Avatar

    Hi Duc,

    Based on your Nike project, you are implement the UICollectionView in UITableViewController on specific table cell.

    I noticed that you are set the height as static.

    func …..heightForRowAt……..
    if indexPath.row == 3 {
    return self.tableView.bounds.width + 68

    I have tried using this 'return UITableViewAutomaticDimension', but not working.
    How I can make it dynamic (based on numberOfItemsInSection) ?

  7. Ori Merimi Avatar

    i tried building it three times every time i got the same FATAL Error

    fatal error: unexpectedly found nil while unwrapping an Optional value

  8. Nurlybek Mursaliyev Avatar

    hi Duc Tan,

    how to add images from Photo Album or camera?

  9. david nwokoye Avatar

    Still waiting for the other part…

  10. MAX NELSON Avatar

    I have a request: Pinterest style uicollectionView tutorial. I know there is a cocoa pod for this but I want to learn how to create it with out using external dependencies

  11. News News Avatar

    Where is the animation part duc ?

  12. 김동현 Avatar

    thank you !!
    but I'd like to learn about that transitioning. could you post it?

  13. An Trần Avatar

    awe video , Duc ! and ? are you vietnamese ?

  14. emiliano259 Avatar

    nice tutorial, do you have any tutorial to create horizontal scroll view with only text?

  15. Craig the Cat Avatar

    More great work Duc!

  16. Duyet Tran Avatar

    Don't use sender as UIImage to pass data, It works but not good practice

  17. abdou ett Avatar

    Thank you Duc! Great work

  18. Franklin morel Avatar

    Great job thank you. Try to do a tutorial about an ecommerce app.pls there isn't any about this pls help us.

  19. MedoMan Avatar

    Thank you so much
    Really nice tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *