Tiffany Du – OMOA Challenge

Late start, I know, but I want to commit to finishing the 29 Day Beginner Challenge before the end of this month! I started this challenge in May, but ran into a bug while working on the Match App and got stuck. Haven’t picked it back up since with everything that’s been going on in life. However, my plan is to start the Match App from the beginning and GET. IT. DONE.

Managed to get back to where I was previously with no bugs! This makes me think the bug I had originally has something to do with the code I wrote to avoid duplicate cards, so I think I’m gonna save that task for last.

Sooo I couldn’t help myself. I wanted to see whether or not it was my code for avoiding duplicates that was causing issues so I simply copied that over to my new project file and crossed my fingers. Looks like everything is still working!!

And in case anyone is wondering, this is the error I was getting:

Thread 1: Exception: "invalid nib registered for identifier (CardCell) - nib must contain exactly one top level object which must be a UICollectionReusableView instance"

I can’t figure out what it means, but please let me know if you do! I would love to understand what I did wrong the first time. Otherwise, I’ll consider this a win for today! :tada:

What does the code look like where this error happened?

You are somehow messing with the collection view

Hi Mikaela, the error is showing up in the AppDelegate.swift file and the simulator displays a blank white screen. I’ve compared the code from this project to the new project that works and even all the settings in the Inspector panel for the collection view objects and everything looks to be the same.

The ONLY difference between the two projects is that on the old one (the one throwing this error), I had added and deleted a playground that I used to write the while loop that prevents duplicate cards. Could that have caused the issue?

OMG I just figured it out! I looked around some more and found the issue in the CardCollectionViewCell.swift file. Turns out it was just a dumb mistake of selecting the wrong subclass. :woman_facepalming:

Gotta be more careful next time, but at least now I know what to look for. Thanks for offering to help, Mikaela! I was ready to just move on, but you motivated me to poke around some more lol.

1 Like

Hi @Tiffany,

Glad you’ve found the issue.

I was about to write " Check the tableview cell file if you have not added anything outside the bounds of the cell by mistake"…

:+1:

1 Like

Thanks, Cedric! Appreciate the thought anyhow. :slight_smile:

Everything went pretty smooth today. Just a couple more lessons and I’ll be done with this Matching game and the 29 Day Beginner Challenge! So eager to build more apps and get a firmer grasp on things.

Today’s Progress:
:white_check_mark: Card Flipping
:white_check_mark: Game Logic

demo

1 Like

Hey Tiffany! Glad you got it sorted!! Yes programming can be very tedious and you have to pay attention to little details

Can’t wait to see how the rest goes!

1 Like

Learned a lot of useful things today! Should be able to wrap this up tomorrow. :smile:

Today’s Progress:
:white_check_mark: Add Timer
:white_check_mark: Win Condition
:white_check_mark: Create Alert Messages

demo

2 Likes

Finally done with this app AND the 29 Day Beginner Challenge! :tada: :grin:

Today’s Progress:
:white_check_mark: Add Sound Effects

demo

I’ve learned so much in this process, and I can’t wait to solidify these skills. Think I’m gonna bite the bullet and enroll in CWC+ since I enjoy Chris’ teaching style so much!

:partying_face::partying_face::partying_face: nice job @Tiffany !!

CWC + is definitely a great option to enhance your skills!!

1 Like