UIKit iOS 12.4 to 13.0 API Differences

NSAttributedString.h
NSDataAsset.h
Declaration
From- (instancetype)initWithName:(NSString *)name
To- (instancetype)initWithName:(NSDataAssetName)name

Declaration
From- (instancetype)initWithName:(NSString *)name bundle:(NSBundle *)bundle
To- (instancetype)initWithName:(NSDataAssetName)name bundle:(NSBundle *)bundle

Declaration
From@property (nonatomic, readonly, copy) NSString *name
To@property (nonatomic, readonly, copy) NSDataAssetName name

NSLayoutAnchor.h
Added #def NSLAYOUTANCHOR_EXTERN
Protocols
Fromnone
ToNSCoding, NSCopying

NSLayoutConstraint.h
Added #def NSLAYOUTCONSTRAINT_EXTERN
Declaration
From+ (NSArray<__kindof NSLayoutConstraint *> *)constraintsWithVisualFormat:(NSString *)format options:(NSLayoutFormatOptions)opts metrics:(NSDictionary<NSString *,id> *)metrics views:(NSDictionary<NSString *,id> *)views
To+ (NSArray<NSLayoutConstraint *> *)constraintsWithVisualFormat:(NSString *)format options:(NSLayoutFormatOptions)opts metrics:(NSDictionary<NSString *,id> *)metrics views:(NSDictionary<NSString *,id> *)views

NSLayoutManager.h
Protocols
FromNSCoding
ToNSSecureCoding

DeclarationAvailabilityDeprecation Message
From@property (nonatomic) CGFloat hyphenationFactorAvailablenone
To@property CGFloat hyphenationFactorDeprecatedPlease use usesDefaultHyphenation or -[NSParagraphStyle hyphenationFactor] instead.

AvailabilityReplacement
FromAvailablenone
ToDeprecatedshowCGGlyphs:positions:count:font:textMatrix:attributes:inContext:

NSTextAttachment.h
Protocols
FromNSCoding, NSTextAttachmentContainer, UIAccessibilityContentSizeCategoryImageAdjusting
ToNSSecureCoding, NSTextAttachmentContainer, UIAccessibilityContentSizeCategoryImageAdjusting

NSTextContainer.h
Protocols
FromNSCoding, NSTextLayoutOrientationProvider
ToNSSecureCoding, NSTextLayoutOrientationProvider

NSTextStorage.h
Modified NSTextStorage
Protocols
Fromnone
ToNSSecureCoding

NSUserActivity+NSItemProvider.h
Added NSUserActivity (NSItemProvider)
UIAccelerometer.h
AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUIAcceleration has been replaced by the CoreMotion framework

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUIAcceleration has been replaced by the CoreMotion framework

UIAccessibility.h
UIAccessibilityAdditions.h
UIAccessibilityConstants.h
UIAccessibilityCustomAction.h
UIAccessibilityElement.h
Superclass
FromNSObject
ToUIResponder

Declaration
From@property (nonatomic, assign) id accessibilityContainer
To@property (nonatomic, weak) id accessibilityContainer

UIAction.h
Added UIAction
UIActionSheet.h
AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUIActionSheet is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleActionSheet instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUIActionSheet is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleActionSheet instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUIActionSheet is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleActionSheet instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUIActionSheet is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleActionSheet instead.

UIActivityIndicatorView.h
AvailabilityReplacement
FromAvailablenone
ToDeprecatedUIActivityIndicatorViewStyleLarge

AvailabilityReplacement
FromAvailablenone
ToDeprecatedUIActivityIndicatorViewStyleMedium

AvailabilityReplacement
FromAvailablenone
ToDeprecatedUIActivityIndicatorViewStyleMedium

UIActivityItemProvider.h
UIActivityItemsConfiguration.h
UIActivityItemsConfigurationReading.h
UIApplication.h
AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedPlease use PushKit for VoIP applications.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse UIView's userInteractionEnabled property instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse UIView's userInteractionEnabled property instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse UIView's userInteractionEnabled property instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedShould not be used for applications that support multiple scenes as it returns a key window across all connected scenes

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedProvide a custom network activity UI in your app if desired.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse viewWillTransitionToSize:withTransitionCoordinator: instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse the statusBarManager property of the window scene instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse a BGAppRefreshTask in the BackgroundTasks framework instead

Declaration
From- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions
To- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary<UIApplicationLaunchOptionsKey,id> *)launchOptions

Declaration
From- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
To- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary<UIApplicationLaunchOptionsKey,id> *)launchOptions

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse viewWillTransitionToSize:withTransitionCoordinator: instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse viewWillTransitionToSize:withTransitionCoordinator: instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse viewWillTransitionToSize:withTransitionCoordinator: instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse viewWillTransitionToSize:withTransitionCoordinator: instead.

Declaration
From- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification completionHandler:(void (^)())completionHandler
To- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification completionHandler:(void (^)(void))completionHandler

Declaration
From- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)())completionHandler
To- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)(void))completionHandler

Declaration
From- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void (^)())completionHandler
To- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void (^)(void))completionHandler

Declaration
From- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)())completionHandler
To- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)(void))completionHandler

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse a BGAppRefreshTask in the BackgroundTasks framework instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse viewWillTransitionToSize:withTransitionCoordinator: instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse viewWillTransitionToSize:withTransitionCoordinator: instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse viewWillTransitionToSize:withTransitionCoordinator: instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse viewWillTransitionToSize:withTransitionCoordinator: instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse viewWillTransitionToSize:withTransitionCoordinator: instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse viewWillTransitionToSize:withTransitionCoordinator: instead.

UIApplicationShortcutItem.h
UIBarAppearance.h
UIBarButtonItem.h
UIBarButtonItemAppearance.h
UIBlurEffect.h
UIButton.h
UICollectionView.h
AvailabilityReplacement
FromAvailablenone
ToDeprecatedcollectionView:contextMenuConfigurationForRowAtIndexPath:

AvailabilityReplacement
FromAvailablenone
ToDeprecatedcollectionView:contextMenuConfigurationForRowAtIndexPath:

AvailabilityReplacement
FromAvailablenone
ToDeprecatedcollectionView:contextMenuConfigurationForRowAtIndexPath:

UICollectionViewCompositionalLayout.h
UIColor.h
UICommand.h
Added UICommand
UIContextMenuConfiguration.h
UIContextMenuInteraction.h
UIDevice.h
AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse -[UIDevice userInterfaceIdiom] directly.

UIDiffableDataSource.h
UIDocumentBrowserViewController.h
Declaration
FromNSString *const UIDocumentBrowserErrorDomain
Toconst NSErrorDomain UIDocumentBrowserErrorDomain

Declaration
From@property (nonatomic, strong) NSArray<UIDocumentBrowserAction *> *customActions
To@property (nonatomic, copy) NSArray<UIDocumentBrowserAction *> *customActions

UIDocumentMenuViewController.h
AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUIDocumentMenuDelegate is deprecated. Use UIDocumentPickerViewController directly.

UIDocumentPickerViewController.h
UIDragPreviewParameters.h
Removed -[UIDragPreviewParameters init]
Removed -[UIDragPreviewParameters initWithTextLineRects:]
Removed UIDragPreviewParameters.visiblePath
Removed UIDragPreviewParameters.backgroundColor
SuperclassProtocols
FromNSObjectNSCopying
ToUIPreviewParametersnone

UIFont.h
UIFontDescriptor.h
UIFontPickerViewController.h
UIFontPickerViewControllerConfiguration.h
UIGeometry.h
UIGestureRecognizer.h
UIHoverGestureRecognizer.h
UIImage.h
UIImageAsset.h
UIImageConfiguration.h
UIImageSymbolConfiguration.h
UIImageView.h
UIImpactFeedbackGenerator.h
UIInputViewController.h
UIInterface.h
AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse UIBarStyleBlack instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse UIBarStyleBlack and set the translucent property to YES instead.

AvailabilityReplacement
FromAvailablenone
ToDeprecatedsystemGroupedBackgroundColor

UIKeyCommand.h
Modified UIKeyCommand
SuperclassProtocols
FromNSObjectNSCopying, NSSecureCoding
ToUICommandnone

Declaration
From+ (UIKeyCommand *)keyCommandWithInput:(NSString *)input modifierFlags:(UIKeyModifierFlags)modifierFlags action:(SEL)action
To+ (instancetype)keyCommandWithInput:(NSString *)input modifierFlags:(UIKeyModifierFlags)modifierFlags action:(SEL)action

DeclarationAvailabilityReplacement
From+ (UIKeyCommand *)keyCommandWithInput:(NSString *)input modifierFlags:(UIKeyModifierFlags)modifierFlags action:(SEL)action discoverabilityTitle:(NSString *)discoverabilityTitleAvailablenone
To+ (instancetype)keyCommandWithInput:(NSString *)input modifierFlags:(UIKeyModifierFlags)modifierFlags action:(SEL)action discoverabilityTitle:(NSString *)discoverabilityTitleDeprecatedkeyCommandWithInput:modifierFlags:action:

UIKitDefines.h
Removed #def UIKIT_DEFINE_AS_PROPERTIES
Removed #def UIKIT_REMOVE_ZERO_FROM_SWIFT
Removed #def UIKIT_STRING_ENUMS
UILargeContentViewer.h
UIMenu.h
Added UIMenu
UIMenuBuilder.h
UIMenuController.h
Modified -[UIMenuController setMenuVisible:]
DeclarationAvailabilityDeprecation Message
From@property (nonatomic, getter=isMenuVisible) BOOL menuVisibleAvailablenone
To- (void)setMenuVisible:(BOOL)menuVisibleDeprecatedUse showMenuFromView:rect: or hideMenuFromView: instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse showMenuFromView:rect: or hideMenuFromView: instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse showMenuFromView:rect: instead.

UIMenuElement.h
UIMenuSystem.h
UINavigationBar.h
UINavigationBarAppearance.h
UINavigationController.h
UINavigationItem.h
UIOpenURLContext.h
UIPickerView.h
AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedThis property has no effect on iOS 7 and later.

UIPopoverBackgroundView.h
AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedNo longer supported

UIPopoverPresentationController.h
AvailabilityReplacement
FromAvailablenone
ToDeprecatedpresentationControllerShouldDismiss:

AvailabilityReplacement
FromAvailablenone
ToDeprecatedpresentationControllerDidDismiss:

UIPopoverSupport.h
AvailabilityReplacement
FromAvailablenone
ToDeprecatedmodalInPresentation

UIPresentationController.h
UIPreviewParameters.h
UIPrintPageRenderer.h
Declaration
From@property (nonatomic, copy) NSArray<UIPrintFormatter *> *printFormatters
To@property (atomic, copy) NSArray<UIPrintFormatter *> *printFormatters

UIResponder.h
UIResponder+UIActivityItemsConfiguration.h
UIScene.h
Added UIScene
UISceneActivationConditions.h
Added NSUserActivity (UISceneActivationConditions)
UISceneDefinitions.h
UISceneOptions.h
UISceneSession.h
UIScreen.h
UIScreenshotService.h
UIScrollView.h
DeclarationAvailabilityDeprecation Message
From@property (nonatomic) UIEdgeInsets scrollIndicatorInsetsAvailablenone
To- (UIEdgeInsets)scrollIndicatorInsetsDeprecatedThe scrollIndicatorInsets getter is deprecated, use the verticalScrollIndicatorInsets and horizontalScrollIndicatorInsets getters instead.

UISearchBar.h
UISearchController.h
AvailabilityReplacement
FromAvailablenone
ToDeprecatedobscuresBackgroundDuringPresentation

UISearchTextField.h
UISegmentedControl.h
Removed UISegmentedControl.tintColor
UISplitViewController.h
UIStatusBarManager.h
UIStepper.h
Removed UIStepper.tintColor
UIStoryboard.h
UISwitch.h
Removed UISwitch.tintColor
UITabBar.h
UITabBarAppearance.h
UITabBarItem.h
UITableView.h
AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse UIContextualAction and related APIs instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse UIContextualAction and related APIs instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse UIContextualAction and related APIs instead.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse UIContextualAction and related APIs instead.

AvailabilityReplacement
FromAvailablenone
ToDeprecatedtableView:trailingSwipeActionsConfigurationForRowAtIndexPath:

AvailabilityReplacement
FromAvailablenone
ToDeprecatedtableView:contextMenuConfigurationForRowAtIndexPath:point:

AvailabilityReplacement
FromAvailablenone
ToDeprecatedtableView:contextMenuConfigurationForRowAtIndexPath:point:

AvailabilityReplacement
FromAvailablenone
ToDeprecatedtableView:contextMenuConfigurationForRowAtIndexPath:

UITargetedDragPreview.h
Removed -[UIDragPreviewTarget initWithContainer:center:transform:]
Removed -[UIDragPreviewTarget initWithContainer:center:]
Removed UIDragPreviewTarget.container
Removed UIDragPreviewTarget.center
Removed UIDragPreviewTarget.transform
Removed -[UITargetedDragPreview initWithView:parameters:target:]
Removed -[UITargetedDragPreview initWithView:parameters:]
Removed -[UITargetedDragPreview initWithView:]
Removed UITargetedDragPreview.target
Removed UITargetedDragPreview.view
Removed UITargetedDragPreview.parameters
Removed UITargetedDragPreview.size
SuperclassProtocols
FromNSObjectNSCopying
ToUIPreviewTargetnone

SuperclassProtocols
FromNSObjectNSCopying
ToUITargetedPreviewnone

UITargetedPreview.h
UITextDropping.h
Declaration
From@property (nonatomic, readonly, getter=isTextDropActive) _Bool textDropActive
To@property (nonatomic, readonly, getter=isTextDropActive) BOOL textDropActive

UITextField.h
UITextFormattingCoordinator.h
UITextInput.h
Removed UITextWritingDirectionNatural
Removed UITextWritingDirectionLeftToRight
Removed UITextWritingDirectionRightToLeft
Declaration
From- (UITextWritingDirection)baseWritingDirectionForPosition:(UITextPosition *)position inDirection:(UITextStorageDirection)direction
To- (NSWritingDirection)baseWritingDirectionForPosition:(UITextPosition *)position inDirection:(UITextStorageDirection)direction

Declaration
From- (void)setBaseWritingDirection:(UITextWritingDirection)writingDirection forRange:(UITextRange *)range
To- (void)setBaseWritingDirection:(NSWritingDirection)writingDirection forRange:(UITextRange *)range

Declaration
From@property (nonatomic, readonly) UITextWritingDirection writingDirection
To@property (nonatomic, readonly) NSWritingDirection writingDirection

AvailabilityReplacement
FromAvailablenone
ToDeprecatedNSWritingDirection

UITextInteraction.h
UITextView.h
UIToolbar.h
UIToolbarAppearance.h
UITraitCollection.h
UIVibrancyEffect.h
UIView.h
Modified UIView
Protocols
FromCALayerDelegate, NSCoding, UIAccessibilityIdentification, UIAppearance, UIAppearanceContainer, UICoordinateSpace, UIDynamicItem, UIFocusItem, UIFocusItemContainer, UITraitEnvironment
ToCALayerDelegate, NSCoding, UIAccessibilityIdentification, UIAppearance, UIAppearanceContainer, UICoordinateSpace, UIDynamicItem, UIFocusItem, UIFocusItemContainer, UILargeContentViewerItem, UITraitEnvironment

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse the block-based animation API instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse the block-based animation API instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse the block-based animation API instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse the block-based animation API instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse the block-based animation API instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse the block-based animation API instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse the block-based animation API instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse the block-based animation API instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse the block-based animation API instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse the block-based animation API instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse the block-based animation API instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse the block-based animation API instead

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse the block-based animation API instead

UIViewController.h
AvailabilityReplacement
FromAvailablenone
ToDeprecatedcanPerformUnwindSegueAction:fromViewController:sender:

AvailabilityReplacement
FromAvailablenone
ToDeprecatedUIContextMenuInteraction

AvailabilityReplacement
FromAvailablenone
ToDeprecatedUIContextMenuInteraction

AvailabilityReplacement
FromAvailablenone
ToDeprecatedUIContextMenuInteraction

AvailabilityReplacement
FromAvailablenone
ToDeprecatedUIContextMenuInteraction

AvailabilityReplacement
FromAvailablenone
ToDeprecatedUIContextMenuInteraction

AvailabilityReplacement
FromAvailablenone
ToDeprecatedUIContextMenuInteraction

AvailabilityReplacement
FromAvailablenone
ToDeprecatedUIContextMenuInteraction

AvailabilityReplacement
FromAvailablenone
ToDeprecatedUIContextMenuInteraction

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUIViewControllerPreviewing is deprecated. Please use UIContextMenuInteraction.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUIViewControllerPreviewing is deprecated. Please use UIContextMenuInteraction.

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUIViewControllerPreviewing is deprecated. Please use UIContextMenuInteraction.

UIWindow.h
Modified -[UIWindow setScreen:]
DeclarationAvailabilityReplacement
From@property (nonatomic, strong) UIScreen *screenAvailablenone
To- (void)setScreen:(UIScreen *)screenDeprecatedsetWindowScene:

UIWindowScene.h
UNNotificationResponse+UIKitAdditions.h
Added UNNotificationResponse (UIKitAdditions)