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

mobile development


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

Week 2 Day 1 – Custom or Designated Initializer

Here’s the Objective-C code that I like to start with in order to write custom or designated initializers. – (instancetype)init {     self = [super init];     if …

Read More

frequently used vim commands

For the vim newbies out there, here’s a list of the vim commands that I use most on a day-to-day basis. vim seems really intimidating at first, but once you …

Read More

Week 1 Day 5 – Object Oriented Programming in iOS

Some random nuggets that I learned today (or maybe these things just clicked if I covered them before): – Class methods (+) are typically used for initialization. Normally, you’ll typically …

Read More

Week 1 Day 4 – NSMutableDictionary > NSMutableArray

Today I learned that I should use NSMutableDictionary instead of NSMutableArray for fast indexing/searching. Never thought about it that way before — I always used to only consider it when …

Read More

Week 1 Day 2 – Github vs. project.pbxproj and storyboards

Today, I learned about the hell that can be git merging .pbxproj and .storyboard files in iOS. I got to experience first hand the importance of good clear commits. Some …

Read More

Week 1 Day 1 – Saving to Address Book

We did a lot of Git + Github today, which I have used before. We also built a simple “Profile app” (to introduce ourselves) using a Tab Bar View Controller. …

Read More

Using RGB Colors in Objective-C

A quick helper macro to use RGB colors for iOS: #define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0] [[UINavigationBar appearance] setBarTintColor:UIColorFromRGB(0x067AB5)];

Read More

iOS Facebook Login [Cheatsheet]

Below are some notes for getting Facebook Login to work on iOS 7. Create Facebook App – Log into Facebook Developers at https://developers.facebook.com/apps and click “Create New App”. – Type …

Read More