One of my goals in 2013 is to contribute more to open source. So here’s a first simple component I’ve regularly used in some apps.


DMRNotificationView is a simple panel that is usually used to notify the user about something. I’m pretty sure you have seen this before in apps like TweetBot. This version however does not contain an icon. It just has a title and an optional subtitle.

You can make the subtitle as long as you want, the view will adjusts the height. It also allows you to provide a tintcolor (and automatically makes that transparent).

It all basically happens in drawRect:. So there are no labels or any UIView subviews. Usage is super simple. You can present the notification view in one single line of code like this:

[DMRNotificationView showInView:self.view
                          title:@"Simple notification"
                       subTitle:@"Some subtitle"];

That will produce an alert view like shown in the image above. There are more methods for advanced usage, just check the header file.The code is available on GitHub.