【发布时间】:2017-05-22 04:03:05
【问题描述】:
我现在想知道我的代码有什么问题。在尝试了很多之后,我想出了如何将 UIAlert 传递给……有点……但我得到了错误。另一双眼睛会很适合一些建议。源代码会很棒。在此先感谢代码如下。我只是把我需要转移的部分代码。我还没有写完“didfinishRecievingResource”;因为我在这一点上卡住了。如果这是不可能的,你能告诉我这样我可以采取不同的路线。再次感谢您甚至查看此内容。我也在使用 xcode 8。谢谢 多点连接
func session(_ session: MCSession, didStartReceivingResourceWithName resourceName: String, fromPeer peerID: MCPeerID, with progress: Progress) {
self.newAlert(title: "HI", message: "Player 1 !")
func newAlert (title: String, message:String)
{
let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: output.text, style: UIAlertActionStyle.default, handler: { (action) in
}))
self.present(alert,animated: true, completion:nil)
}
}
}
【问题讨论】:
标签: ios iphone swift3 xcode8 uialertview