从private到fileprivate

image.png
从UIBarButtonItemStyle.Plain到UIBarButtonItemStyle.plain

image.png
从
.CGColor到.cgColor

image.png
从NSBundle.mainBundle().infoDictionary到Bundle.main.infoDictionary更精简

image.png
方法名位置调整
从.popViewControllerAnimated(true)到popViewController(animated: true),animated飞升了

image.png
内部参数外部参数

image.png
通知中心嗨起来
NSNotificationCenter.defaultCenter()到NotificationCenter.default
键盘通知名从UIKeyboardWillChangeFrameNotification到 NSNotification.Name.UIKeyboardWillChangeFrame

image.png
这个开始有点头晕了
好像是selector的引用从Selector("interactivePopGestureRecognizer")到#selector(getter: UINavigationController.interactivePopGestureRecognizer)

image.png
从NSTimeInterval到TimeInterval

image.png
UITextViewDelegate有变,这个一敲Xcode会有提示的,不用记

image.png
GCD更精简
DispatchQueue.global().async {
DispatchQueue.main.async {
self.label?.text = "finished"
}
}
let delay = DispatchTime.now() + .seconds(60)
DispatchQueue.main.after(when: delay) {
// Do something
}

image.png
已放弃更新,太多报错,Swift真是坑