spatialphotodisplaycontroller修复循环引用

This commit is contained in:
bluesea 2024-03-19 16:29:53 +08:00
parent 6bd53acba3
commit 04135ee4ba

View File

@ -134,9 +134,9 @@ class CCSpatialPhotoDisplayController: BaseController {
//init (testarrow)
let pointOnScreen = navtionImgView!.convert(CGPointMake(navtionImgView!.centerX, navtionImgView!.bottom), to: KWindow)
let popMenu = CCSpatialDisplayTypeView(menuWidth: SCREEN_Width * 0.4, arrow: pointOnScreen, datas: typeData,configures: parameters){
let popMenu = CCSpatialDisplayTypeView(menuWidth: SCREEN_Width * 0.4, arrow: pointOnScreen, datas: typeData,configures: parameters){ [weak self] in
//dissmiss
self.mTopCenterTypeButton.setImage(UIImage.init(named: "type_button_arrow_down"), for: .normal)
self?.mTopCenterTypeButton.setImage(UIImage.init(named: "type_button_arrow_down"), for: .normal)
}
return popMenu
}()
@ -150,12 +150,14 @@ class CCSpatialPhotoDisplayController: BaseController {
deinit {
print("spatioal photo display deinit...")
print("spatioal photo display deinit...\(self)")
NotificationCenter.default.removeObserver(self)
}
override func viewDidLoad() {
super.viewDidLoad()
print("spatioal photo viewdidload...\(self)")
// return
//
// NotificationCenter.default.addObserver(self, selector: #selector(exScreenWillConnectNotification(notification:)), name: UIScene.willConnectNotification, object: nil)
// NotificationCenter.default.addObserver(self, selector: #selector(exScreenDisConnectNotification(notification:)), name: UIScene.didDisconnectNotification, object: nil)