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 uses HUDs to show global system level notifications.

Apple uses HUD for miscellaneous disconnected information

For example, as in the screenshot above, like volume increased or mouse disconnected. Apple uses a HUD for “disconnected” errors/alerts but unfortunately, most apps have been using them for showing a modal progress or other miscellaneous information. A cleaner way would be to use a sliding alert panel like TweetBot. To make life easier for developers, I have made a class, MKInfoPanel which does exactly that.

How to use

Using MKInfoPanel is as easy as using an UIAlertView, or in fact even easier. You just make one single call and the panel shows and hides itself.

    [MKInfoPanel showPanelInView:self.view
                            type:MKInfoPanelTypeError
                           title:@"Network Failure!"
                        subtitle:@"Check your internet connection and try again later!"
                       hideAfter:2];

To use this in your own apps, open the project on XCode, drag the MKInfoPanel group into your project. Link your project against QuartzCore.Framework if you haven’t already. You are good to go!

Demo

Here is a quick 20 sec demo of the panel in action.

Source code

The source code is available, royalty free, on github. However, a tweet wouldn’t cost you either. 😛

Mugunth

Follow me on Twitter