Search
Duplicate

alert 창

생성일
2023/07/12 23:25
태그
Swift

alert 창

func startReady(topic: String, view: String) { let alertController = UIAlertController(title: "자가진단", message: "\(topic) 진단을 시작 하시겠습니까?", preferredStyle: .alert) let confirmAction = UIAlertAction(title: "시작", style: .default) { (action) in self.performSegue(withIdentifier: view, sender: self) } let cancelAction = UIAlertAction(title: "취소", style: .cancel, handler: nil) alertController.addAction(confirmAction) alertController.addAction(cancelAction) present(alertController, animated: true, completion: nil) }
Swift
복사