Ios 提交操作后如何返回tableviewcontroller?

Ios 提交操作后如何返回tableviewcontroller?,ios,swift,Ios,Swift,我在应用程序中创建了提交审阅操作。当用户提交时,他会收到一个成功警报 成功警报后,我希望应用程序将用户重定向回应用程序中的上一页。另外,我的帖子评论页面类型为“现在模式”,那么我如何才能在用户提交后将其下拉 这是我的支票 这是我在提交时向用户查看的消息 let messageVC = UIAlertController(title: "Review submitted successfully!", message: "" , preferredStyle

我在应用程序中创建了提交审阅操作。当用户提交时,他会收到一个成功警报

成功警报后,我希望应用程序将用户重定向回应用程序中的上一页。另外,我的帖子评论页面类型为“现在模式”,那么我如何才能在用户提交后将其下拉

这是我的支票

这是我在提交时向用户查看的消息

let messageVC = UIAlertController(title: "Review submitted successfully!", message: "" , preferredStyle: .actionSheet)
                self.present(messageVC, animated: true) {
                    Timer.scheduledTimer(withTimeInterval: 2.0, repeats: false, block: { (_) in
                        messageVC.dismiss(animated: true, completion: nil)})}

我如何将他重定向回我的tableviewcontroller?

将其放入“您解除”功能中,无需计时器,只需在完成后分派队列并解除:

let messageVC = UIAlertController(title: "Review submitted successfully!", message: "" , preferredStyle: .actionSheet)
                self.present(messageVC, animated: true) {
                    Timer.scheduledTimer(withTimeInterval: 2.0, repeats: false, block: { (_) in
                        messageVC.dismiss(animated: true, completion: nil)
                        self.dismiss(animated: true, completion: nil)
})}
let messageVC = UIAlertController(title: "Review submitted successfully!", message: "" , preferredStyle: .actionSheet)
    present(messageVC, animated: true) {
        DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
            messageVC.dismiss(animated: true) {
                self.dismiss(animated: true, completion: nil)
            }
        }
    }

@RomanRyzhiy这对tableview也有效吗?@RomanRyzhiy我的提交评论页面的类型是modally,所以在这种情况下也有效吗?您好,谢谢您的回答,我在询问之前尝试了这个,它不起作用,因为我的页面类型是modally。这样它就不会错过页面并将其放下。@mike祝您愉快:)