Ios 安装TestFlight Beta后,UIAlertController的行为会有所不同
这里的新手需要一些帮助Ios 安装TestFlight Beta后,UIAlertController的行为会有所不同,ios,swift,testflight,uialertcontroller,Ios,Swift,Testflight,Uialertcontroller,这里的新手需要一些帮助 我正在使用Parse BaaS来简化一个简单的消息传递应用程序 我已成功将我的应用程序提交到iTunes Connect 我已经开启了测试飞行测试 我已经添加了2个内部测试器 我已成功安装在两个不同的设备上 对于应用程序: 我有两个tableView,一个在mainViewController中,一个在directMessageViewController中 mainViewController已启动 用于显示消息列表和 输入用户名和密码登录的UIAlertControl
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
var messageAlert:UIAlertController = UIAlertController(title: "New Direct Message", message: "Enter your message", preferredStyle: UIAlertControllerStyle.Alert)
messageAlert.addTextFieldWithConfigurationHandler{
(directMessageField: UITextField!) -> Void in
directMessageField.placeholder = "Your message..."
}
messageAlert.addAction(UIAlertAction(title: "Send", style: UIAlertActionStyle.Default, handler:
{
(alertAction:UIAlertAction!)-> Void in
var pushQuery:PFQuery = PFInstallation.query()
pushQuery.whereKey("user", equalTo: self.userList.objectAtIndex(indexPath.row))
var push:PFPush = PFPush()
push.setQuery(pushQuery)
let textfields:NSArray = messageAlert.textFields as AnyObject! as NSArray
let messageTextField:UITextField = textfields.objectAtIndex(0) as UITextField
push.setMessage(messageTextField.text)
push.sendPushInBackgroundWithTarget(nil, selector: nil)
}))
messageAlert.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Default, handler: nil))
self.presentViewController(messageAlert, animated: true, completion: nil)
}
我有没有做错什么事?提前谢谢