YRDropdownView – A Polite UIAlertView Alternative for iOS

YRDropdownView is an iOS library for displaying stylish alerts, warnings, and errors

UIKit’s Shortcomings

From day one, iOS developers have been struggling to alert users about simple warnings and errors that may not interrupt the flow of the app. Popping up UIAlertViews requires the user to click a button to move along, which wasn’t quite necessary for warnings that merely limit useability. Adding a UILabel somewhere on the screen isn’t consistent and doesn’t always look great.

Maybe you just have some more information you want to inform your user about. Simply adding it to the screen is sufficient, but what if your information is added off screen? How does your user know it has appeared? TweetBot found a great solution to that. By overlaying a simple panel, with an icon, title, and message, the flow of the app is uninterrupted, yet informs the user in a concise manner.

Tweetbot Alert Example


Imitation Is The Greatest Form Of Flattery

YRDropdownView

YRDropdownView is a simple and versitile class that will increase the visibility of information relating to your app in a stylish way. YRDropdownView draws inspiration from such libraries like MKInfoPanel, MBProgressHUD, and DSActivityView and fills the gaps where these classes left off.

Usage

herever you want to use YRDropdownView, import the header file as follows:

Basic

You can create your dropdown by calling the singleton method:

By default, calling the above method will only dismiss when clicked on. To dismiss manually in your code, call:

Customizing

There are many different ways to customize the alert by calling different singleton methods:

Notes

Label and Background Customization

Currently, the title and detail labels, as well as the yellow background, are static for all dropdowns. Customizing these features are a TODO for this project.

Automatic Reference Counting (ARC) support

ARC support has been neglected in part for now. Your contributions are more than welcome, however. If you want to use YRDropdownView in an ARC project, just add the add the compiler flag:

to all YRDropdownView files in your project.

Project on GitHub

For the cutting edge releases and outstanding issues, we’ve set up a GitHub repository to keep everything in order. Feel free to post any code related issues or contributions there in addition to in the comments below. We’ll also be doing minor releases there from time to time without making full blog posts. Enjoy!

Posted Wednesday, February 1st, 2012 · Back to Top

SPONSOR

Add Comment

43 Comments 5 Mentions

  1. 7OOOF.net Author Editor

    Well Done… Thanks

    ·

  2. kostas mouzakitis Author Editor

    Continue the good job :)

    ·

  3. fabir Author Editor

    very helpful thanks

    ·

  4. fabir Author Editor

    best web site ever…
    thanks man

    ·

  5. شات صوتي Author Editor

    You are great and thank for you articles

    ·

  6. Crane Boom Truck Author Editor

    this was so cool! i love your articles

    ·

  7. bdahfdsai Author Editor

    this was so cool! i love your articles

    ·

  8. clipping path service Author Editor

    Very useful article. You’ve done really excellent work. I’ll visit your blog again.

    ·

  9. Vilson Author Editor

    Why u guys use this auto-comment plugin? Boring to see it

    ·

  10. Acompanhantes brasilia Author Editor

    Very nice post I will use!

    ·

  11. phphunger Author Editor

    wow great work..i like it…

    ·

  12. nike air shox shoes Author Editor

    The important thing in life is to have a great aim , and the determination to attain it.

    ·

  13. acompanhantes brasilia Author Editor

    Thanks, I liked too much..

    ·

  14. Francisco Martins Author Editor

    Nice job! Can i use it with cocoapods?

    ·

  15. manjusavanth Author Editor

    wow grt job

    ·

  16. Daniel Torres Author Editor

    Very useful article. You’ve done really excellent work. I’ll visit your blog again.

    ·

  17. طراحی سایت Author Editor

    it was very insteresting
    tanx

    ·

  18. بهینه سازی سایت Author Editor

    gread job dude

    ·

  19. Zohaib Author Editor

    Very Nice tutorials…

    ·

  20. britanniainks Author Editor

    That is the most insane case i have ever seen!

    ·

  21. طراحی سایت Author Editor

    YRDropdownView – A Polite UIAlertView Alternative for iOS very good!!!! diiiiiiiiiiiiiii

    ·

  22. sonu sindhu Author Editor

    very nice
    I like it..

    ·

  23. app Author Editor

    wow great info thanks for sharing..

    ·

  24. fun pic Author Editor

    I found this is an educational and interesting publication, so I think it is very useful and knowledgeable. Thank you for the efforts you have made in writing this submission. I am hoping the analogous best work from you next time as well. practically your creative writing ability has inspired me.

    ·

  25. mahesh Author Editor

    From day one, iOS developers have been struggling to alert users about simple warnings and errors that may not interrupt the flow of the app.

    ·

  26. http://essayshelpers.co.uk/ Author Editor

    Great post, thanks for sharing!)

    ·

  27. http://bestessay4u.com/ Author Editor

    Many thanks to the person who made this post, this was very informative for me. Please continue this awesome work

    ·

  28. John Piechnick Author Editor

    I found this is an educational and interesting publication, so I think it is very useful and knowledgeable. Thank you for the efforts you have made in writing this submission. I am hoping the analogous best work from you next time as well. practically your creative writing ability has inspired me.

    ·

  29. Web Design Campbell Author Editor

    This kind of posts are encouraging and I prefer to read such quality content. Good effort great job.

    ·

  30. http://bestessaywriter.net/ Author Editor

    Wonderful story, reckoned we could combine a couple of unrelated information, nevertheless seriously really worth taking a search, whoa did one learn about Mid East has got much more problerms at the same time

    ·

  31. Sandra Smith Author Editor

    Ha ha . looks like developers have got some nice tool to glorify error message ..

    ·

  32. Tien Trinh Author Editor

    I think this is ACE! Keep sharing stuff like this please! :)

    ·

  33. ten mien Author Editor

    Thanks, I liked too much….

    ·

  34. bestessaysonly.com Author Editor

    I just want to tell you that I am all new to blogging and site-building and certainly loved you’re blog. Almost certainly I’m likely to bookmark your site . You actually come with very good writings. Thanks a bunch for revealing your website page.

    ·

  35. http://anyessay.co.uk/ Author Editor

    Your site amazing list of vectors, definitely a bookmark blog. Always good to have some inspiration and resources.

    ·

  36. http://essaymakers.co.uk/ Author Editor

    Useful info. Fortunate me I discovered your site unintentionally, and I_m shocked why this coincidence did not happened in advance! I bookmarked it.

    ·

  37. essay writing Author Editor

    I LOVE the idea. It is good stuff really like it! Thanks for sharing with us.

    ·

  38. shelters Author Editor

    i love your articles. nice web site

    ·

  39. London web designer Author Editor

    Some times we need like this:p

    ·

  40. boxhaiphong Author Editor

    So nice blog, i love your articles!

    ·

  41. trend mobilya Author Editor

    omg great post like this is.I would recommend!

    ·

  42. طراحی سایت Author Editor

    thanks

    ·

 

Build Internet by One Mighty Roar. Since 2008.