iOS7 compatibility change

Hello,

Thanks for this really helpful control
This pull request aims at adding the iOS7 support to this utility
Also addresses a few cosmetic changes, feel free to merge what you feel appropriate

Cheers