nico bistol.fi

Published on

Custom UIAlertView for iOS apps

Authors

You are wondering how to create a custom AlertView for your iOS app, default AlertView is awful and cannot be customized as we might want to.

Even though is very easy to use it, you only need to write this code:

[[[UIAlertView alloc] initWithTitle:@"Great!" message:@"This is default UIAlertView" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil] show];

The result is simple too

[UIAlertView default]

We'll what about doing something like this with your UIAlertView

[TAlertView]

 

It's also very easy and you only need to use pods, add this line to your pod file:

pod "TAlertView"

Run "pod install" and you're good to go.  Start playing with TAlertView adding this simple line:

[[[TAlertView alloc] initWithTitle:@"Great!" andMessage:@"This is a basic alert"] show];

 

On Github: https://github.com/tellmarket/TAlertView