2016-07-19 11 views

答えて

10

EDIT:最後の行は私にエラーを与えている

func showErrorAlert(title: String , msg: String){ 
    let alert = UIAlertController(title: title, message: msg, preferredStyle: .Alert) 
    let action = UIAlertAction(title: "OK", style: .Default, handler: nil) 
    alert.addAction(action) 
    presentedViewController(alert, animated: true, completion: nil) 
} 

3、それを

present(alert, animated: false, completion: nil) 

に変更しました。

は(アニメーション、警告:偽、完了:ゼロ)

presentViewController(alert, animated: true, completion: nil) 

代わりのself.presentにpresentedViewController(alert, animated: true, completion: nil)

+3

変更にする必要がありすぎて、この問題を解決します。 – eyal

+0

'presentViewController'は私に同じエラーを与えました、' self.present'だけが働いた – Antek

関連する問題