Weekly code challenges. Hone your skills. Earn limited edition badges. Get prizes.
How To Submit Your Solution
All code challenge submissions will be done via Twitter.
– Send me a tweet telling me you’ve completed the challenge.
– Make sure you get my attention by mentioning my Twitter handle, @CodeWithChris.
– Attach a photo or video of your working solution to your Tweet.
– PS. If it’s a debugging challenge, don’t post the solution or else you’ll spoil the fun for others!
At the end of the deadline, I’ll award the badges and prizes (coming soon) and reply to your tweet to let you know when it’s happened.
Also, every week there’ll be a new Reddit thread where you can get help with the code challenge.
This Week’s iOS Code Challenge (Jan 5, 2018 to Jan 11, 2018)
Challenge #5: The Mystery Card
Download the project below and run the app in the simulator. Scroll to the bottom of the collection view and notice that there are 17 cards.
There should only be 16!
Use your debugging skills to find out why there is 17 cards and fix it!
PS. Please don’t post the solution when you submit it or else it’ll spoil the challenge. Just post a screenshot of your collection view with no extra card 🙂 Thank you!
Open up a new Playground and write a function that satisfies the following requirements:
– Accepts a String parameter
– Returns an Int based on the total number of letter “a” or “A”s in the string that gets passed in.
– If the String parameter has no “a” or “A”s, then return 0.
– Passing in the string, “Radar”, should return 2.
– Passing in the string, “Hello, should return 0.
– You can treat the String like an array.
– The String class has some useful functions. Make sure you check them out!
Build an app user interface that meets the following requirements:
– Divides the screen into 4 equal quadrants.
– In each quadrant, display an image (can be any image).
– Must work in both portrait and landscape orientations.