在UINavigationController中获得弹出视图的通知可以通过以下步骤实现:
NotificationCenter.default.addObserver(self, selector: #selector(presentedViewControllerDidShow), name: NSNotification.Name(rawValue: "PresentedViewControllerDidShowNotification"), object: nil)
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "PresentedViewControllerDidShowNotification"), object: nil)
@objc func presentedViewControllerDidShow() {
// 处理弹出视图显示完成后的逻辑
}
通过以上步骤,你可以在UINavigationController中获得弹出视图的通知,并在接收到通知后执行相应的逻辑。
关于腾讯云相关产品,推荐使用腾讯云移动推送(TPNS)来实现通知的发送和接收。TPNS是腾讯云提供的移动推送服务,支持iOS和Android平台,具有高可靠性和稳定性。你可以通过以下链接了解更多关于腾讯云移动推送的信息:
腾讯云移动推送(TPNS):https://cloud.tencent.com/product/tpns
领取专属 10元无门槛券
手把手带您无忧上云