@objc func popCartView(tapGestureRecognizer: UITapGestureRecognizer)
{
let modalViewController = CartViewController()
modalViewController.modalPresentationStyle = .overCurrentContext
self.present(modalViewController, animated: true, completion: nil)
}
如何使用更多时间(例如2秒(来完成此视图来完成动画
@objc func popCartView(tapGestureRecognizer: UITapGestureRecognizer)
{
let modalViewController = CartViewController()
modalViewController.modalPresentationStyle = .overCurrentContext
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
// Your code with delay
self.present(modalViewController, animated: true, completion: nil)
}
}