UIAlertController在关闭WiFi时出错(UIAlertController is giving error on turning off WiFi)
UIAlertController在关闭WiFi时出错
let networkIssueController = UIAlertController(title: "Error", message: "Unable to load data. Connectivity error!", preferredStyle: .Alert) let okButton = UIAlertAction(title: "Ok", style: .Default, handler: nil) networkIssueController.addAction(okButton) let cancelButton = UIAlertAction(title: "Cancel", style: .Cancel, handler: nil) networkIssueController.addAction(cancelButton) self.presentViewController(networkIssueController, animated: true, completion: nil)错误显示是EXC_BAD_ACCESS(code=1,address=0x10)
可能是造成此错误的原因是什么?
UIAlertController is giving error on turning WiFi off
let networkIssueController = UIAlertController(title: "Error", message: "Unable to load data. Connectivity error!", preferredStyle: .Alert) let okButton = UIAlertAction(title: "Ok", style: .Default, handler: nil) networkIssueController.addAction(okButton) let cancelButton = UIAlertAction(title: "Cancel", style: .Cancel, handler: nil) networkIssueController.addAction(cancelButton) self.presentViewController(networkIssueController, animated: true, completion: nil)error showing is EXC_BAD_ACCESS(code=1,address=0x10)
What may be the cause for this error?
最满意答案
这是一个简单的警报视图,这非常有效。 试试吧。
let alertController = UIAlertController(title: "Warning", message: "Test", preferredStyle: UIAlertControllerStyle.Alert) let cancel = UIAlertAction(title: "OK", style: UIAlertActionStyle.Cancel, handler: nil) alertController.addAction(cancel) self.presentViewController(alertController, animated: true, completion: nil)This is a simple alert view and this works perfectly. Try this out.
let alertController = UIAlertController(title: "Warning", message: "Test", preferredStyle: UIAlertControllerStyle.Alert) let cancel = UIAlertAction(title: "OK", style: UIAlertActionStyle.Cancel, handler: nil) alertController.addAction(cancel) self.presentViewController(alertController, animated: true, completion: nil)UIAlertController在关闭WiFi时出错(UIAlertController is giving error on turning off WiFi)UIAlertController在关闭WiFi时出错
let networkIssueController = UIAlertController(title: "Error", message: "Unable to load data. Connectivity error!", preferredStyle: .Alert) let okButton = UIAlertAction(title: "Ok", style: .Default, handler: nil) networkIssueController.addAction(okButton) let cancelButton = UIAlertAction(title: "Cancel", style: .Cancel, handler: nil) networkIssueController.addAction(cancelButton) self.presentViewController(networkIssueController, animated: true, completion: nil)错误显示是EXC_BAD_ACCESS(code=1,address=0x10)
可能是造成此错误的原因是什么?
UIAlertController is giving error on turning WiFi off
let networkIssueController = UIAlertController(title: "Error", message: "Unable to load data. Connectivity error!", preferredStyle: .Alert) let okButton = UIAlertAction(title: "Ok", style: .Default, handler: nil) networkIssueController.addAction(okButton) let cancelButton = UIAlertAction(title: "Cancel", style: .Cancel, handler: nil) networkIssueController.addAction(cancelButton) self.presentViewController(networkIssueController, animated: true, completion: nil)error showing is EXC_BAD_ACCESS(code=1,address=0x10)
What may be the cause for this error?
最满意答案
这是一个简单的警报视图,这非常有效。 试试吧。
let alertController = UIAlertController(title: "Warning", message: "Test", preferredStyle: UIAlertControllerStyle.Alert) let cancel = UIAlertAction(title: "OK", style: UIAlertActionStyle.Cancel, handler: nil) alertController.addAction(cancel) self.presentViewController(alertController, animated: true, completion: nil)This is a simple alert view and this works perfectly. Try this out.
let alertController = UIAlertController(title: "Warning", message: "Test", preferredStyle: UIAlertControllerStyle.Alert) let cancel = UIAlertAction(title: "OK", style: UIAlertActionStyle.Cancel, handler: nil) alertController.addAction(cancel) self.presentViewController(alertController, animated: true, completion: nil)
发布评论