我遇到了以下几行代码中的表达式类型不明确的问题:
缺乏更多上下文,使表达式类型模糊不清
代码如下:
NotificationCenter.default.addObserver(self, selector: #selector(willResignActive), name: .UIApplication.willResignActiveNotification , object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(openedAgain), name: .UIApplication.didBecomeActiveNotification, object: nil)
什么是正确的语法?