The hardest part of learning to code isn’t the programming language, it’s the platform. If you want to learn to develop for the iPhone, you’ll need to learn how to work with Cocoa.
To get more comfortable with Cocoa Touch, I created a list of programming assignments, and challenged myself to complete one per day. Not only did I learn a lot, but working through the assignments gave me confidence in my ability to solve programming problems, one at a time
I’m sharing this list because I think the challenges might be helpful for other new developers. They’re not especially difficult, but they will expose you to different parts of iOS.
The process of thinking about the problem, researching the solution, and implementing + debugging the code helped me learn more about mobile development than any tutorial or course ever has — maybe they’ll do the same for you.
Beginner - Intermediate
These are straightforward tasks so long as you do your homework. The majority can be finished in an hour or two — it’s just a matter of knowing what you don’t know.
Alerts: Display a basic UIAlert. Then customize it to prompt for a username and password.
Sharing: Implement social sharing in two ways — first with a share sheet of your own design, and next with the system controlled activity menu.
Dates: Use the date picker UI element to create an age gate. Perform a segue if the user is over 18, and an error if they’re not.
Popover Dialogue: Drag an “info” disclosure button onto a storyboard, and use it to load a popover view that displays modally, even on small screens.
Image Picker: Present an image picker that lets a user select a photo from their camera roll, then display that photo on the view.
Webviews: Create a list of URLs and randomly display one in a web view. Next, add a refresh control above the webview to reload the page, and a spinner to indicate the loading activity.
Animations: Look up “animateWithDuration” and go crazy with some scale, rotate, and transform animations.
Dynamic Animations: Use the dynamic animator to add gravity and physics collisions to an application. Make an image animate to the point where a user tapped with a snap behaviour, then let gravity act on the object so that it begins to freefall. Finally, add a collision path to the boundaries of the screen.
Modal Window: Create a dialogue view with rounded corners and present it modally on top of another view. Blur the background view and let the user dismiss the modal by tapping on the background.
Onboarding Slides: Design an onboarding tutorial with a carousel of information displayed across four or five slides (look into UIPageViewController to solve this).
Accordion Menu: Use tableview sections to create an accordion style menu (i.e. a tableview where clicking a section header expands/collapses the underlying cells).
Segmented Controller: Switch between two view controllers using a segmented controller.
These are a little more complicated and involve multiple steps to get to a solution.
Try to stay focused and do one thing at a time.
Scrollview + Networking: Load and display a high resolution image from the web (don’t forget the loading spinner). Set up panning and pinch controls to let the user interact with the full size image.
Path Menu: Design your own version of the Path popout menu by creating a button that, when pressed, causes other menu items to animate onto the screen. You’ll want to stack multiple animations (alpha, transform, rotation) to get the desired effect.
Cover Photos: Replicate the stretchy headers at the top of many article-based applications by repositioning an image based on the strength of a user’s scroll. For an added challenge, try cutting out a bezier path similar to Yahoo News.
MapKit: Create a map view that accesses the user’s location and lists nearby points of interest. Then, ask where they’d like to go next and chart a course between the two destinations.
There are many third-party libraries that will be useful in your programming career.
Don’t reinvent the wheel unless you have to!
Trello Tables: Display two table views next to each other. Then make it so the user can tap-and-hold to drag cells between the two tables like the Trello application. This isn’t really a standard iOS interaction, but you’ll have to think about the different gesture states and manage each tableview’s data.
Parse: Get yourself up and running with a Parse database! Follow the getting started documentation to create a working account creation/login screen.