I only need to display DELETE and CANCEL button as alert, no alert title or a message, and add action to DELETE button. Tried to modify following code but couldn't succeeded. And additionally, I want to make UIVIEW bit darker when DELETE and CANCEL buttons displayed. What is the best way to do this ?
let refreshAlert = UIAlertController(title: "Alert", message: "Are you sure ?", preferredStyle: UIAlertControllerStyle.Alert)
var imageView = UIImageView(frame: CGRectMake(220, 10, 40, 40))
let yourImage = UIImage(named: "delete")
imageView.image = yourImage
refreshAlert.view.addSubview(imageView)
refreshAlert.addAction(UIAlertAction(title: "Ok", style: .Default, handler: { (action: UIAlertAction!) in ...