RTF Files and Attributed Strings

If you've ever tried setting up a UITextView in Storyboard, you might already know that it's an annoying task. The customizations don't work often and it's easy to mistakenly clear all styles with no way of coming back (unless of course you are using version control and don't have other…

Push Notifications in iOS8

There have been some great changes to iOS notifications with the iOS8 update. This means that now you can send a payload of upto 2KB instead of the 256 bytes earlier. iOS8 also separates the silent and UI push notifications. It means that you can send notifications without any UI…

Nested Sections in UITableView

Sometimes, there might be cases where you would like to display nested sections in a UITableView. For example, consider an app organizing groups taxonomically like so Sports Bat-and-ball Baseball Softball Cricket Hockey Field Hockey Ice Hockey Roller Hockey Engineering Computer Science Software Engineer Electrical Engineer A UITableView really isn't designed…

Best Practices for Table View Data Sources

If you read objc.io, you already know what I am talking about, lighter view controllers. Table views are heavily used in iOS apps and most of the times, all the code for handling the data source goes right in the controller. As the app starts growing, the controllers become…

NavBar problem with MKMapView in iOS7

While developing an iOS application, I came across the use of MKMapView. The map view itself is pretty easy to integrate in the app. But it comes with a very annoying bug in iOS 7 when working with a custom color for navigation bar. On the device, any controller containing…

Blinking/Flashing animation in iOS

In a recent project that I worked on, we needed to show the busy state of the application without explicitly writing out anything. After brainstorming different strategies, we finally settled on blinking one of our central buttons in the app to represent that it is busy. iOS makes it really…