iosobjective-chud

custom alert view


Foursquare uses a customised alert (like the attached image). I'm trying to get the same look and feel, rounded corners, fade in and fade out effect, etc. I'm looking around but all the solutions I found seems to over complicate something simple, like:

http://joris.kluivers.nl/blog/2009/04/23/subclass-uialertview-to-create-a-custom-alert/

Am I in the right path? Should I use some custom view class that I don't know about? Should I write my own?

Image


Solution

  • The approach you linked is fine. They probably subclassed UIAlertView to get the same "dim" effect when the alert pops up (see their screenshots). Foursquare doesn't have that dim effect (in your image). They probably simply subclassed UIView and added it as a subview to the UIWindow of the app.