Skip to content

Instantly share code, notes, and snippets.

@nolim1t
Created June 6, 2014 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nolim1t/9f30ff97e7cf9920f84d to your computer and use it in GitHub Desktop.
Save nolim1t/9f30ff97e7cf9920f84d to your computer and use it in GitHub Desktop.
Currently gets a Bad access error. Any ideas
import UIKit
class AlertClass: NSObject {
func ShowAlertBox(title : NSString, msg : NSString) {
var alertMsg = UIAlertView(title: title, message: msg, delegate: nil, cancelButtonTitle: "Dismiss")
alertMsg.show()
}
}
@nolim1t
Copy link
Author

nolim1t commented Jun 6, 2014

Seems a like a common issue

rdar://17189590 and rdar://17188083

@sircharleswatson
Copy link

Hey, so UIAlertView is deprecated in iOS 8 so that's probably why it doesn't work anymore. Check out the accepted answer on SO here:

http://stackoverflow.com/questions/24022479/how-would-i-create-a-uialertview-in-swift

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment