UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Day 42 - CollectionView not working

Forums > 100 Days of Swift

Hello everyone,

I am having trouble in day 42 of Hacking wth Swift... I am just starting with UICollectionView and obviously I am making some terrible mistake because what I get is what I show in the image attached. I did the all day three times and I followed each step carefully. I don't know why I don't get the same result that Paul does.

I think I have everything connected right. I also read the web page that comes with the video and I think everything is ok. Has this happened to anyone else?

I took several screenshots so you can help me try to identify this mistake: https://www.icloud.com/iclouddrive/0-qAAaHSCI8nzGtMhEBmyFdsA#Names_to_Faces

Thank you so much.

Tomás

5      

Hey buddy,

I'm taking on Day 42 today, I'll let you know if I have the same issue. It might have something to do with the outdated version of Xcode Paul is using in the videos. Stay tuned and don't worry!

6      

Hey! Thank you so much for your help.

Please let me know when you have something.

Best, Tomás

4      

BUILD THE ULTIMATE PORTFOLIO APP Most Swift tutorials help you solve one specific problem, but in my Ultimate Portfolio App series I show you how to get all the best practices into a single app: architecture, testing, performance, accessibility, localization, project organization, and so much more, all while building a SwiftUI app that works on iOS, macOS and watchOS.

Get it on Hacking with Swift+

Sponsor Hacking with Swift and reach the world's largest Swift community!

Hi! Could you describe what exactly does not work and ideally post code where you think the issue is?

Also you can upload those images for sites like https://imgur.com/ and post link or post them inline so others dont have to add your folder to their iCloud to see the images :-) Thanks

4      

Hello! Thank you for your reply. The problem is not specifically with the code, I think. It does not work since video one where we only work with interface builder. I am not being able to produce the same results as Paul - creating the custom cells.

https://imgur.com/a/xVFH9jt

It is really strange I don't know why it does not work.

Can you spot any mistake I may have made?

Thanks!

4      

I dont see any obvious problems. If you have Xcode 11.4 I would try selecting the collection view in interface builder and setting estimated cell size to "None".

5      

Exactly, the only thing you have to do is to change the 'Estimate Size' to none:

https://imgur.com/a/s5zg7nR

Have a nice day!

4      

This used not to be a case prior Xcode 11.4. I had perfectly working collection view which 11.4 broke and setting the estimate size fixed it,

4      

Thank you for your help!!! I did it! :D

Cheers!

5      

I had the same issue, and this resolved it for me as well. Thanks everyone!

4      

I had the same issue!

Thank you ;)

3      

@Tele_  

Thanks so much, was having the same issue and even posted it on the forum but yay this saves me from debugging for hours gahaha 😅😂

3      

Thanks everyone!! I'm so glad I found this!! Was having the same issue and not having any clue on how to fix it.

3      

Thank you for all of you here. I am so happy to fix it. It must change the collection view inspector of Estimate size must be NONE!

4      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.