LoginSignup
22
13

More than 5 years have passed since last update.

Swift4.2へのバージョンアップで自動置換できなかったパターン

Posted at

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
22
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
22
13