0
나는 아래의 코드를 구현하지만 난 경고 메시지가 :Swift 지불 방법 알림을 표시하는 방법 QueueRestoreCompletedTransactionsFinished?
경고 :에 그보기 창 계층 구조에없는 제시하는 시도를! paymentQueueRestoreCompletedTransactionsFinished (큐 : SKPaymentQueue)에
및 경고가 표시되지 않습니다.
func paymentQueueRestoreCompletedTransactionsFinished(queue: SKPaymentQueue) {
alert("Félicitations", message: "Vous avez restauré vos packs, cliquez sur ok pour les télécharger !")
}
func alert(title:String, message:String = "") {
let alert = UIAlertController(title: title, message:message, preferredStyle: .Alert)
alert.addAction(UIAlertAction(title: "OK", style: .Default) { _ in
if title == "Félicitations" {
let next = self.storyboard?.instantiateViewControllerWithIdentifier("TelechargementVC") as! TelechargementViewController
self.presentViewController(next, animated: true, completion: nil)
}
})
self.presentViewController(alert, animated: true){}
}
NB : 내가 전화를 회전 할 경우, 경고가 바로 회전 [/ 편집] 여기
후에 표시되는 [편집] 내 코드 경고 기능이 문제없이 다른 함수에서 호출 .
어떻게 해결할 수 있습니까? 이 helpfull 포스트에
나는 paymentQueueRestoreCompletedTransactionsFinished에서 새로운 뷰를 보여 주려고하고 가지고있다 같은 종류의 메시지 ... – Ludo