Update:Nov 7th 2011: Get the latest ARC compatible template from the Attachments section With XCode 4, Apple has made some changes to the template subsystem as such none of the old templates that worked on XCode 3 will work automatically. After spending a couple of hours, I managed to figure out the differences and fortunately, the new template subsystem is more cleaner than XCode 3. The Singleton template I created last year is now...
Read MoreiOS Code: Block based performSelector
In the previous post we added block based methods to UIAlertView and UIActionSheet. I’ve extended the same code with Category addition for NSObject that allows you to perform a block of code using a custom method called performBlock which works similar to performSelector. [self performBlock:^ { NSLog(@"hi there!"); } ]; So using a block, you can do a performSelector...
Read MoreiOS Code: Block Based UIAlertView and UIActionSheet
Delegates are very useful at times but can be very hard to maintain at other times. With iOS 4, Apple introduced a functional programming aspect to it’s object oriented language, Objective C. (Prior to iOS 4, you could technically use blocks using the plausible blocks toolchain.) In this piece of open source code, we will explore how blocks can really simplify your code by avoiding un-necessary callback delegates. If you have done iOS...
Read MoreComparison: Bootup time of iPhone4 vs Windows Phone 7 (HTC HD7)
I made a quick video showing how fast the Windows Phone 7 boots up. As you may see, I switched on the iPhone first (6th sec) and then the Windows Phone (9th sec) (I’ve only two hands, one for holding my camera and the other to switch on the devices). Yet, the Windows Phone booted up (39th sec) and was ready for use even before the iPhone 4. The iPhone despite showing the lock screen, was a bit unresponsive for a few seconds (50th...
Read MoreDesigning usable mobile apps
Another usability related blog from me after a long time and now, it’s a mobile vs web debate. While not exactly a rant, I intend to bridge the gap between web designers and mobile designers. Information architecture on mobile In the web 2.0 era, not much thought or discussion was spent on how to organize your content on your website. Primary reason could be because, there were easier workarounds to get away with this. For example,...
Read MoreiOS Tip: Display Names in iPhone Display Order
If you have noticed the contacts app on your iPhone/iPad, it displays the contacts based on your preference of sort order and display order in Settings. Contacts app on iPhone displays your contacts based on this order Fortunately, there is a quick and easy snippet to get this information and use it on your app. The AddressBook framework provides a method called ABPersonGetSortOrdering() to read this info. I use this code...
Read MoreMac App: iConify
My first mac app, iConify is available on Mac App Store! After 17 days on radio silence from Apple, they approved it today. What is iConify? iConify is a quick little tool to resize icons for your iOS app. The beauty of iConify is that, there are no configuration options, tweaks whatsoever. Launch the app, drag an icon into it, Boom, a resized and properly named file appears inside the iConify folder. How is it different from competing...
Read More