regexident/DLAlertView — pull request #12 by jeremybower (2014-04-13 21:48:08+00:00)
Title: Multiple main window support, custom title background colour support, fixed fuzzy layout bug, added .gitignore

Hello!

Great framework. Here are a few changes I needed to make it work with my project:

1. Multiple main window support: The controller was selecting the first main window it found when dismissing the alert view. However, my project uses multiple main windows. I changed the controller to look for the top main window and to control the tint of all main windows.

2. Title background colour: As described, I needed the ability to put a custom background colour behind the title. I added a use case to the demo to show how it works.

3. Fixed fuzzy layout bug: While adding the custom title background, I noticed that sizing the title and message text created fractional points for the offset parameter. Using fractional points will cause text to appear fuzzy. I added calls to ceil() to round up the space needed for text. I also use floor() to round down the space needed for the alert view height. A fractional height was causing artifacts to appear at top and bottom of the view -- much more noticeable with a custom title background.

4. I added a .gitignore file so git won't prompt me to commit files I shouldn't be committing.