UIKit iOS 15.0 Beta 1 to Beta 2 API Differences

NSParagraphStyle.h
Removed #def FALL_2021_NEW_API_TRANSITION
NSTextContentManager.h
Removed NSTextElementProviderEnumerationOptions
Removed NSTextElementProviderEnumerationOptionsNone
Removed NSTextElementProviderEnumerationOptionsReverse
Removed -[NSTextElementProvider adjustedRangeFromRange:inEditingTextSelection:]
Removed -[NSTextContentManager performEditingTransactionWithBlock:]
Removed NSTextContentManager.synchronizesTextLayoutManagersAutomatically
Removed NSTextContentManager.synchronizesToBackingStoreAutomatically
Removed -[NSTextContentManagerDelegate textContentManager:shouldEnumerateTextElement:withOptions:]
Removed NSTextContentStorage.textStorage
Added NSTextContentManagerEnumerationOptions
Added NSTextContentManagerEnumerationOptionsNone
Added NSTextContentManagerEnumerationOptionsReverse
Added -[NSTextElementProvider adjustedRangeFromRange:forEditingTextSelection:]
Added -[NSTextContentManager performEditingTransactionUsingBlock:]
Added NSTextContentManager.automaticallySynchronizesTextLayoutManagers
Added NSTextContentManager.automaticallySynchronizesToBackingStore
Added -[NSTextContentManagerDelegate textContentManager:shouldEnumerateTextElement:options:]
Added -[NSTextContentStorage locationFromLocation:withOffset:]
Added -[NSTextContentStorage offsetFromLocation:toLocation:]
Added -[NSTextContentStorage adjustedRangeFromRange:forEditingTextSelection:]
Modified -[NSTextElementProvider enumerateTextElementsFromLocation:options:usingBlock:]
Declaration
From- (id<NSTextLocation>)enumerateTextElementsFromLocation:(id<NSTextLocation>)textLocation options:(NSTextElementProviderEnumerationOptions)options usingBlock:(BOOL (^)(NSTextElement * _Nonnull))block
To- (id<NSTextLocation>)enumerateTextElementsFromLocation:(id<NSTextLocation>)textLocation options:(NSTextContentManagerEnumerationOptions)options usingBlock:(BOOL (^)(NSTextElement * _Nonnull))block

Modified -[NSTextElementProvider synchronizeToBackingStore:]
Declaration
From- (BOOL)synchronizeToBackingStore:(void (^)(NSError * _Nullable))completionHandler
To- (void)synchronizeToBackingStore:(void (^)(NSError * _Nullable))completionHandler

Modified -[NSTextElementProvider locationFromLocation:withOffset:]
Optional
FromRequired
ToOptional

Modified -[NSTextElementProvider offsetFromLocation:toLocation:]
Optional
FromRequired
ToOptional

Modified -[NSTextContentManager synchronizeTextLayoutManagers:]
Declaration
From- (BOOL)synchronizeTextLayoutManagers:(void (^)(NSError * _Nullable))completionHandler
To- (void)synchronizeTextLayoutManagers:(void (^)(NSError * _Nullable))completionHandler

Modified NSTextContentStorage
Protocols
Fromnone
ToNSTextStorageObserving

NSTextElement.h
Modified NSTextParagraph.attributedString
Declaration
From@property (readonly, copy) NSAttributedString *attributedString
To@property (readonly, strong) NSAttributedString *attributedString

NSTextLayoutFragment.h
Removed -[NSTextLayoutFragment drawAtPoint:context:]
Removed NSTextLayoutFragment.textAttachmentViewProviders
Removed -[NSTextLayoutFragment frameForTextAttachmentAtLocation:]
Added NSTextLayoutFragment.leadingPadding
Added NSTextLayoutFragment.trailingPadding
Added NSTextLayoutFragment.topMargin
Added NSTextLayoutFragment.bottomMargin
Added -[NSTextLayoutFragment drawAtPoint:inContext:]
NSTextLayoutManager.h
Removed NSTextLayoutManagerSegmentOptionsRangeMiddleFragmentsExcluded
Removed NSTextLayoutManagerSegmentOptionsRangeHeadSegmentExtended
Removed NSTextLayoutManagerSegmentOptionsRangeTailSegmentExtended
Removed NSTextLayoutManagerSegmentOptionsRangeUpstreamAffinity
Removed -[NSTextLayoutManagerDelegate textLayoutManager:textContainerForLocation:]
Removed -[NSTextLayoutManagerDelegate textLayoutManager:shouldUseRenderingAttributes:forLink:atLocation:]
Added NSTextLayoutManagerSegmentOptionsMiddleFragmentsExcluded
Added NSTextLayoutManagerSegmentOptionsHeadSegmentExtended
Added NSTextLayoutManagerSegmentOptionsTailSegmentExtended
Added NSTextLayoutManagerSegmentOptionsUpstreamAffinity
Added -[NSTextLayoutManagerDelegate textLayoutManager:renderingAttributesForLink:atLocation:defaultAttributes:]
NSTextLineFragment.h
Removed -[NSTextLineFragment drawAtPoint:context:]
Removed -[NSTextLineFragment characterIndexForPoint:fractionOfDistanceThroughGlyph:]
Added -[NSTextLineFragment drawAtPoint:inContext:]
Added -[NSTextLineFragment characterIndexForPoint:]
Added -[NSTextLineFragment fractionOfDistanceThroughGlyphForPoint:]
Modified NSTextLineFragment.attributedString
Declaration
From@property (readonly, copy) NSAttributedString *attributedString
To@property (readonly, strong) NSAttributedString *attributedString

NSTextSelectionNavigation.h
Removed -[NSTextSelectionNavigation resolvedInsertionPointForTextSelection:writingDirection:]
Removed -[NSTextSelectionDataSource layoutOrientationAtLocation:]
Added NSTextSelectionNavigationWritingDirection
Added NSTextSelectionNavigationWritingDirectionLeftToRight
Added NSTextSelectionNavigationWritingDirectionRightToLeft
Added NSTextSelectionNavigationLayoutOrientation
Added NSTextSelectionNavigationLayoutOrientationHorizontal
Added NSTextSelectionNavigationLayoutOrientationVertical
Added -[NSTextSelectionNavigation resolvedInsertionLocationForTextSelection:writingDirection:]
Added -[NSTextSelectionDataSource textLayoutOrientationAtLocation:]
Modified -[NSTextSelectionDataSource baseWritingDirectionAtLocation:]
Declaration
From- (NSWritingDirection)baseWritingDirectionAtLocation:(id<NSTextLocation>)location
To- (NSTextSelectionNavigationWritingDirection)baseWritingDirectionAtLocation:(id<NSTextLocation>)location

NSTextStorage.h
Removed NSTextStorage.textStorageController
Removed -[NSTextStorageObserving performEditingTransactionForTextStorage:withBlock:]
Added NSTextStorage.textStorageObserver
Added -[NSTextStorageObserving performEditingTransactionForTextStorage:usingBlock:]
NSTextViewportLayoutController.h
Added NSTextViewportLayoutControllerDelegate
Added -[NSTextViewportLayoutControllerDelegate viewportBoundsForTextViewportLayoutController:]
Added -[NSTextViewportLayoutControllerDelegate textViewportLayoutController:configureRenderingSurfaceForTextLayoutFragment:]
Added -[NSTextViewportLayoutControllerDelegate textViewportLayoutControllerWillLayout:]
Added -[NSTextViewportLayoutControllerDelegate textViewportLayoutControllerDidLayout:]
Added NSTextViewportLayoutController
Added -[NSTextViewportLayoutController initWithTextLayoutManager:]
Added NSTextViewportLayoutController.delegate
Added NSTextViewportLayoutController.textLayoutManager
Added NSTextViewportLayoutController.viewportBounds
Added NSTextViewportLayoutController.viewportRange
Added -[NSTextViewportLayoutController layoutViewport]
Added -[NSTextViewportLayoutController relocateViewportToTextLocation:]
Added -[NSTextViewportLayoutController adjustViewportByVerticalOffset:]
UIImage.h
Removed +[UIImage systemImageNamed:shape:]
Removed +[UIImage systemImageNamed:shape:fill:]
Removed +[UIImage systemImageNamed:shape:fill:withConfiguration:]
Removed +[UIImage imageNamed:shape:]
Removed +[UIImage imageNamed:shape:fill:]
Removed +[UIImage imageNamed:shape:fill:withConfiguration:]
Removed -[UIImage imageWithShape:]
Removed -[UIImage imageWithFill:]
Removed -[UIImage imageWithShape:fill:]
Removed -[UIImage imageWithVariantsFromImage:]
Removed -[UIImage imageWithoutVariants]
Added +[UIImage systemImageNamed:variant:]
Added +[UIImage systemImageNamed:variant:withConfiguration:]
Added +[UIImage imageNamed:variant:]
Added +[UIImage imageNamed:variant:withConfiguration:]
Added -[UIImage imageByApplyingVariant:]
Added -[UIImage imageByApplyingVariantFromImage:]
Added -[UIImage imageByRemovingVariant]
UIImageVariants.h
Removed UIImageVariantShape
Removed UIImageVariantShapeUnspecified
Removed UIImageVariantShapeNone
Removed UIImageVariantShapeCircle
Removed UIImageVariantShapeSquare
Removed UIImageVariantShapeRectangle
Removed UIImageVariantFill
Removed UIImageVariantFillUnspecified
Removed UIImageVariantFillOutline
Removed UIImageVariantFillFilled
Added UIImageVariant
Added UIImageVariantNone
Added UIImageVariantCircle
Added UIImageVariantSquare
Added UIImageVariantRectangle
Added UIImageVariantSlash
Added UIImageVariantFill
UIInterface.h
Added UIColor.systemMintColor
Added UIColor.systemCyanColor
UIView.h
Removed UIView.preferredImageVariantShape
Removed UIView.preferredImageVariantFill
Removed -[UIView preferredImageVariantsDidChange]
Added UIView.preferredImageVariant
Added -[UIView preferredImageVariantDidChange]
UIViewController.h
Added UIViewController.sheetPresentationController