After the huge success of the first control I submitted to CocoaControls, MKInfoPanel, I altered it to make it behave like a input panel. MKEntryPanel shows a semi full screen window similar to the UISearchBarController. You can dismiss it by tapping anywhere else. Demo Here is a quick 30 sec demo of the Entry panel in action. Code The source code is available at github. Pick it up, clone it or do whatever you want from...
Read MoreiOS Code: TweetBot like AlertPanels
TweetBot is sexy, no one can deny it. One of the coolest aspect of TweetBot is the unobtrusive panels that show what is happening on the app. Some apps like Reeder have resorted to HUDs. The problem with HUDs are that, they are shown on a different “z-index” and human eye has to shift the focus to read what’s on it. For the same reason, HUDs feel a bit disconnected from the UI which could be why on both iOS and Mac, Apple...
Read MoreObjective-C Singleton Template for XCode 4
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 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 More