I am using Swift to write an app and I need to show an alert. The app must be iOS 7 and iOS 8 compatible. Since UIAlertView has been replaced with UIAlert
UIAlertView
UIAlert
Swift 2.0
if #available(iOS 8.0, *) { } else { }