2
UI 경고를 구현하는 동안 몇 가지 문제가 발생했습니다. 나는 Xcode 8 베타 4에서 신속한 3.0을 사용하고 있는데, 경고를 활성화하는 버튼을 시도하고 있는데, 하나의 버튼 (취소)은 다른 버튼 (ok)이 UIAction Button으로 동작을 수행하지만, 보여줄 수있는 경고를 받는다.왜이 UIAlertController가 표시되지 않습니까?
var warning = UIAlertController(title: "warning", message: "This will erase all content", preferredStyle: .Alert)
var okAction = UIAlertAction(title: "OK", style: UIAlertActionStyle.Default) {
UIAlertAction in
NSLog("OK Pressed")
}
var cancelAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel) {
UIAlertAction in
NSLog("Cancel Pressed")
}
warning.addAction(okAction) {
// this is where the actions to erase the content in the strings
}
warning.addAction(cancelAction)
self.presentViewController(warning, animated: true, completion: nil)
내가 집에 돌아갈 때마다 시험해 보게 해줘서 고마워. swift3.0에 대한 도움이 아직 없다. 크게 appered되었습니다. – Yellow