iOS Open Source : ATMHud Heads Up Display (HUD)

Marcel Müller of AtomTon has written a comprehensive library for creating Heads Up Display effects. From the readme in the project, Marcel explains: “I once needed a HUD for one of my iPhone apps, but was unhappy with the currently available libraries on the internet. Therefore, I decided to create my own library. I’ve released it as a static library last year, but a lot of people wanted to see the source, so here it is.” Thanks Marcel!

There are a number of nice features in this library including auto-rotation, auto-hide, queueing of multiple HUDs, and sound effects. I recommend you spend some time looking over Marcel’s code, there are plenty of interesting things to check out, from Core Animation (and completion blocks) to CALayer objects.

The screenshots below shows an auto-updating and auto-hiding HUD:

The project can be downloaded from github: ATMHud.

Open Source Recommendations ?

Have you written or worked with iOS or Cocoa open source that you think others would find interesting, send me a note.

  1. Hi,

    The idea of creating this component was really nice. In fact, Apple should provide such component in their SDK, don’t you think?

    I followed your recommendation and spent some minutes checking the source code of the component. Unfortunately, I didn’t have the same impression you did. I honestly found it a little amateur. A lot of duplicates, method and variable names that do not correspond with their intent, no pragma marks, a lot of unnecessary code and, what really impressed me: code analyzer warnings that are really simple to fix.

    And regarding the use of CALayers, since it’s a generic component that should be used in all types of situations, I would never use its Shadow feature in there. In some situations the performance is not even close to alright, when you use it. So, I’d use another solution for that.

    Thus, I support the initiative of creating such component, but I think it’s missing some basic features like dimming the screen while the alert is showing up and others. Also, I believe the code and the techniques used are ok but need some refactoring.

    Gustavo Chaurais

    • Thanks Gustavo. Often times open source is a great place to get ideas rolling, and with the help of others, things can be moved to the next level. In the spirit of open source, please feel free to fork the project and make the updates you recommend or start a new project with a similar idea – and please post a comment here if you publish something…

      John

Comments are closed.