Учитывая приведенный ниже код, когда я нажимаю кнопку «Принять», он не переходит на SecondViewController
, он показывает только черный экран. Любая помощь оценивается.Как перемещаться по ViewController при нажатии кнопки в alertView
let alertController = UIAlertController(title: tit!, message: "Book Now!", preferredStyle: .Alert)
let declineAction = UIAlertAction(title: "Decline", style: .Cancel, handler: nil)
alertController.addAction(declineAction)
let acceptAction = UIAlertAction(title: "Accept", style: .Default) { (_) -> Void in
let nv=SecondViewController()
self.presentViewController(nv, animated:true, completion:nil)
}
presentViewController(alertController, animated: true, completion: nil)
alertController.addAction(acceptAction)
T qI попробует ... – Honestraj19
рассказчик-раскачка означает миноритарное имя. Правильно это – Honestraj19
@ Honestraj19 Убедитесь, что вы указали «идентификатор» на свой 'UIViewController' из' StoryBoard' –