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.
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 (Dec 8 – Dec 14, 2017)
Challenge #4: The Library Challenge
Download the playground below and follow the instructions for the challenge. You’ll be asked to write the code for several functions to get the expected output in the Playground console.
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.