Swift4.2へバージョンアップした際のメモ
- 基本的に、エラーが出るようになった部分の
fix
ボタンを押すことで、renameやreplaceされたものが自動変換される - 以下、
fix
ボタンを押しても上手く自動置換が効かなかったパターンを列挙し、書き換え後の内容を併記
.UIKeyboardWillShow
// ↓
UIResponder.keyboardWillShowNotification
NSNotification.Name.UIKeyboardWillShow
// ↓
UIResponder.keyboardWillShowNotification
.UIKeyboardWillHide
// ↓
UIResponder.keyboardWillHideNotification
NSNotification.Name.UIKeyboardWillHide
// ↓
UIResponder.keyboardWillHideNotification
UIImageJPEGRepresentation(uiImage, self.compressionQuality)
// ↓
uiImage.jpegData(compressionQuality: self.compressionQuality)
.UIDeviceOrientationDidChange
// ↓
UIDevice.orientationDidChangeNotification
NSNotification.Name.UIDeviceOrientationDidChange
// ↓
UIDevice.orientationDidChangeNotification