【发布时间】:2018-01-02 12:07:06
【问题描述】:
我有一个 ViewController,我在其中调用 segue 到另一个 ViewController:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == blogSegueIdentifier {
let destination = segue.destination as! Reply
let path = tableView.indexPathForSelectedRow
let cell = tableView.cellForRow(at: path!) as! QuestionsTabCell
destination.blogName = String(cell.labelQues!.tag)
}
}
在打开的 segue (ViewController) 中有一个 UITextView 和一个 UINavigationBar 中的发送按钮。因此,用户输入 textView 并将其发送到服务器,点击按钮,在此打开的 segue (ViewController) 关闭并且用户返回到第一个 ViewController 之后。当用户关闭segue而不使用viewWillAppear时如何在第一个ViewController中调用方法?
【问题讨论】:
-
使用展开转场。
-
@chengsam 请把它写成答案,非常感谢!
标签: ios swift uitableview segue