@@ -183,7 +183,7 @@ extension UINavigationBar:WRAwakeProtocol
183183
184184 var titleColor : UIColor ?
185185 for attribute in originTitleTextAttributes {
186- if attribute. key == NSAttributedStringKey . foregroundColor {
186+ if attribute. key == NSAttributedString . Key . foregroundColor {
187187 titleColor = attribute. value as? UIColor
188188 break
189189 }
@@ -194,8 +194,8 @@ extension UINavigationBar:WRAwakeProtocol
194194 return
195195 }
196196
197- if attributes [ NSAttributedStringKey . foregroundColor. rawValue] == nil {
198- attributes. updateValue ( originTitleColor, forKey: NSAttributedStringKey . foregroundColor. rawValue)
197+ if attributes [ NSAttributedString . Key . foregroundColor. rawValue] == nil {
198+ attributes. updateValue ( originTitleColor, forKey: NSAttributedString . Key . foregroundColor. rawValue)
199199 }
200200 wr_setTitleTextAttributes ( attributes)
201201 }
@@ -237,12 +237,12 @@ extension UINavigationController: WRFatherAwakeProtocol
237237 fileprivate func setNeedsNavigationBarUpdate( titleColor: UIColor )
238238 {
239239 guard let titleTextAttributes = navigationBar. titleTextAttributes else {
240- navigationBar. titleTextAttributes = [ NSAttributedStringKey . foregroundColor: titleColor]
240+ navigationBar. titleTextAttributes = [ NSAttributedString . Key . foregroundColor: titleColor]
241241 return
242242 }
243243
244244 var newTitleTextAttributes = titleTextAttributes
245- newTitleTextAttributes. updateValue ( titleColor, forKey: NSAttributedStringKey . foregroundColor)
245+ newTitleTextAttributes. updateValue ( titleColor, forKey: NSAttributedString . Key . foregroundColor)
246246 navigationBar. titleTextAttributes = newTitleTextAttributes
247247 }
248248
@@ -317,7 +317,7 @@ extension UINavigationController: WRFatherAwakeProtocol
317317 var displayLink : CADisplayLink ? = CADisplayLink ( target: self , selector: #selector( popNeedDisplay) )
318318 // UITrackingRunLoopMode: 界面跟踪 Mode,用于 ScrollView 追踪触摸滑动,保证界面滑动时不受其他 Mode 影响
319319 // NSRunLoopCommonModes contains kCFRunLoopDefaultMode and UITrackingRunLoopMode
320- displayLink? . add ( to: RunLoop . main, forMode: . commonModes )
320+ displayLink? . add ( to: RunLoop . main, forMode: RunLoop . Mode . common )
321321 CATransaction . setCompletionBlock {
322322 displayLink? . invalidate ( )
323323 displayLink = nil
@@ -334,7 +334,7 @@ extension UINavigationController: WRFatherAwakeProtocol
334334 @objc func wr_popToRootViewControllerAnimated( _ animated: Bool ) -> [ UIViewController ] ?
335335 {
336336 var displayLink : CADisplayLink ? = CADisplayLink ( target: self , selector: #selector( popNeedDisplay) )
337- displayLink? . add ( to: RunLoop . main, forMode: . commonModes )
337+ displayLink? . add ( to: RunLoop . main, forMode: RunLoop . Mode . common )
338338 CATransaction . setCompletionBlock {
339339 displayLink? . invalidate ( )
340340 displayLink = nil
@@ -381,7 +381,7 @@ extension UINavigationController: WRFatherAwakeProtocol
381381 @objc func wr_pushViewController( _ viewController: UIViewController , animated: Bool )
382382 {
383383 var displayLink : CADisplayLink ? = CADisplayLink ( target: self , selector: #selector( pushNeedDisplay) )
384- displayLink? . add ( to: RunLoop . main, forMode: . commonModes )
384+ displayLink? . add ( to: RunLoop . main, forMode: RunLoop . Mode . common )
385385 CATransaction . setCompletionBlock {
386386 displayLink? . invalidate ( )
387387 displayLink = nil
0 commit comments