iOS engineer who likes clean, simple designs and sans-serif.

ios objective c


Underneath AFNetworking – How to Work With API’s From Scratch

Here's a cheatsheet of how to make an API request in iOS7+: Obviously, you need to pick an API, sign up for a developer account and add your application. Look ...
Read More

Renaming in XCode5

How often have you named a Controller or a Class, only to realize a little while later that your name makes little sense? You debate internally if you really want ...
Read More

Collection Operators iOS7

Collection Operators allow actions to be performed on the items of a collection using key path notation and an action operator. If you know SQL, I like to think of ...
Read More

Using Pragma Marks To Make Your Code More Readable

I love pragma marks. They just make reading your code so much easier, especially for other developers looking at your code for the first time. To use them, organize your ...
Read More

Deleting UITableView Rows

To enable edits of rows in a UITableView, use the canEditRowAtIndexPath and commitEditingStyle methods. - canEditRowAtIndexPath allows you to set if each individual row is editable or not. - commitEditingStyle ...
Read More

iOS Rotation / Changing Orientation

If you want your app to do something when you change the orientation from portrait to landscape, here's a method you can use for when the rotation completes: - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation ...
Read More

Shake Motion Event

This is one reason why I love Apple + Objective C. It's super easy to implement a "shake" feature. All you have to do is add the method below and ...
Read More

The View Controller LifeCycle

From Paul Hagerty's Stanford Lecture #5, here is the order in which things happen in a View Controller's lifecycle: View controller is instantiated (from storyboard, etc.) awakeFromNib Outlets are set ...
Read More

Week 2 Day 3 – (NSString *) description method

NSObject implements a -(NSString *)description method, which makes debugging in console via NSLog really nice. A few seconds of code can make debugging much easier, especially when working with objects. ...
Read More

Week 2 Day 2 – NSSortDescriptor and NSPredicate

Here's an example on how to use (more than one) NSSortDescriptor. It seems equivalent to a SQL "sort by". NSArray *instructors = @[joe,al,babyAl]; NSSortDescriptor *nameDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"name" ascending:NO]; NSSortDescriptor ...
Read More