Main — Updates from Swift 4 to 4.2 ✚ Xcode 9 to 10 updates
Here are thirty-eight of the updates I came across:
‘UIKeyboardWillHide’ has been renamed to ‘UIResponder.keyboardWillHideNotification’
‘init(activityIndicatorStyle:)’ has been renamed to ‘init(style:)’
Cannot call value of non-function type ‘UNNotificationSound’
‘UIApplicationOpenSettingsURLString’ has been renamed to ‘UIApplication.openSettingsURLString’
🗾
Instance method ‘imagePickerController(_:didFinishPickingMediaWithInfo:)’ nearly matches optional requirement ‘imagePickerController(_:didFinishPickingMediaWithInfo:)’ of protocol ‘UIImagePickerControllerDelegate’
Cannot subscript a value of type ‘[String : Any]’ with an index of type ‘UIImagePickerController.InfoKey’
Instance method ‘imagePickerController(_:didFinishPickingMediaWithInfo:)’ nearly matches optional requirement ‘imagePickerController(_:didFinishPickingMediaWithInfo:)’ of protocol ‘UIImagePickerControllerDelegate’
‘UIImagePNGRepresentation’ has been replaced by instance method ‘UIImage.pngData()’
‘UIImagePickerControllerEditedImage’ has been renamed to ‘UIImagePickerController.InfoKey.editedImage’
‘UIImageRenderingMode’ has been renamed to ‘UIImage.RenderingMode’
🔘
‘UIBarButtonItemStyle’ has been renamed to ‘UIBarButtonItem.Style’
‘UITableViewCellAccessoryType’ has been renamed to ‘UITableViewCell.AccessoryType’
👨👦😢
‘removeFromParentViewController()’ has been renamed
🧒🏻📱
‘addChildViewController’ has been renamed to ‘addChild(_:)’
👨👦📱
‘didMove(toParentViewController:)’ has been renamed to ‘didMove(toParent:)’
✸📈
‘kCAEmitterLayerLine’ has been renamed to ‘CAEmitterLayerEmitterShape.line’
🎆
‘kCAEmitterLayerAdditive’ has been renamed to ‘CAEmitterLayerRenderMode.additive’
📚📱
‘UIStackViewDistribution’ has been renamed to ‘UIStackView.Distribution’
🎸🔑
‘NSAttributedStringKey’ has been renamed to ‘NSAttributedString.Key’
⦝
‘UITableViewAutomaticDimension’ has been renamed to ‘UITableView.automaticDimension’
🤓
‘UIFontTextStyle’ has been renamed to ‘UIFont.TextStyle’
🚨
‘UIAlertControllerStyle’ has been renamed to ‘UIAlertController.Style’
‘UIAlertActionStyle’ has been renamed to ‘UIAlertAction.Style’
🤙🤚🏼
‘UISwipeGestureRecognizerDirection’ has been renamed to ‘UISwipeGestureRecognizer.Direction’
‘UIControlState’ has been renamed to ‘UIControl.State’
‘UIEdgeInsetsMake’ has been replaced by ‘UIEdgeInsets.init(top:left:bottom:right:)’
🎧▶️⏺
‘AVAudioSessionCategoryPlayAndRecord’ has been renamed to ‘AVAudioSession.Category.playAndRecord’
‘UIImageJPEGRepresentation’ has been replaced by instance method ‘UIImage.jpegData(compressionQuality:)’
‘UIViewAutoresizing’ has been renamed to ‘UIView.AutoresizingMask’
‘CKRecordID’ has been renamed to ‘CKRecord.ID’
‘CKReference’ has been renamed to ‘CKRecord.Reference’
‘UITableViewCellEditingStyle’ has been renamed to ‘UITableViewCell.EditingStyle’
‘CKNotificationInfo’ has been renamed to ‘CKSubscription.NotificationInfo’
‘UIBlurEffectStyle’ has been renamed to ‘UIBlurEffect.Style’
‘UIViewAnimationOptions’ has been renamed to ‘UIView.AnimationOptions’
‘UIControlEvents’ has been renamed to ‘UIControl.Event’
‘UIApplicationLaunchOptionsKey’ has been renamed to ‘UIApplication.LaunchOptionsKey’
‘UIWebViewNavigationType’ has been renamed to ‘UIWebView.NavigationType’
If this helped you, share and pass it on! 😀 ➡️ 🐦