I have a an objective-c class (RDAlertView)
which create an Alert (UIAlertView for ios < 8 and UIAlertController for ios >=8 )
Here is the code in Object
UIAlertView
is deprecated in iOS 8.
You can show an alert with this code:
var alert = UIAlertController(title: "Alert", message: "test", preferredStyle: UIAlertControllerStyle.Alert)
alert.addAction(UIAlertAction(title: "Click", style: UIAlertActionStyle.Default, handler: nil))
self.presentViewController(alert, animated: true, completion: nil)