【发布时间】:2016-10-20 12:14:33
【问题描述】:
我创建了一个带有按钮操作的ActionSheet。我有打开操作表的按钮,并且 ActionSheet 按钮打开新的viewController。问题是打开操作表的按钮在tableview cell 里面,我不知道如何用这个按钮传递值。
这个概念应该是这样的,但带有操作表按钮:
actionSheet.addAction(UIAlertAction(title: "Edit it", style: UIAlertActionStyle.destructive, handler: { (ACTION :UIAlertAction!)in
//here I want to pass value to next viewController and open that VC.
//Valu should be something like postsArray[indexPath.row]
}))
【问题讨论】:
-
传值给什么? Action Sheet 还是 viewController?使用您的 actionSheet 代码块更新您的问题,并指定您想要该值的确切位置..
标签: swift firebase swift3 nsindexpath