Skip to content

UIKit tvOS xcode16.0 b5

Rolf Bjarne Kvinge edited this page Aug 28, 2024 · 3 revisions

#UIKit.framework https://github.com/xamarin/xamarin-macios/pull/21130

diff -ruN /Applications/Xcode_16.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIFocus.h /Applications/Xcode_16.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIFocus.h
--- /Applications/Xcode_16.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIFocus.h	2024-07-12 05:05:25
+++ /Applications/Xcode_16.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIFocus.h	2024-07-29 00:04:38
@@ -26,6 +26,19 @@
     UIFocusHeadingLast API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(watchos) = 1 << 9,
 } API_AVAILABLE(ios(9.0)) API_UNAVAILABLE(watchos);
 
+typedef NS_ENUM(NSInteger, UIFocusItemDeferralMode) {
+    /// Use the system default behavior.
+    UIFocusItemDeferralModeAutomatic,
+    /// Always defer focus for this item, even if deferral is disabled right now.
+    /// This means a programmatic update to this item would result in focus
+    /// disappearing until the user interacts with the focus engine again.
+    UIFocusItemDeferralModeAlways,
+    /// Never defer focus for this item. When a programmatic focus update
+    /// lands on this item, it will always be and appear focused even if focus
+    /// deferral is currently enabled.
+    UIFocusItemDeferralModeNever,
+} API_AVAILABLE(ios(18.0), tvos(18.0)) API_UNAVAILABLE(watchos);
+
 typedef NSString * UIFocusSoundIdentifier NS_TYPED_EXTENSIBLE_ENUM API_UNAVAILABLE(watchos);
 
 /// These are focus group priorities that the system uses and that clients can use to make an item
@@ -104,6 +117,13 @@
 /// The priority this item has in its focus group. The higher the priority, the more likely it is to get picked when focus moves into this group.
 /// Note: this method can only be used to increase an item's priority, not decrease it. For example if an item is currently selected, the actual priority of this item will be determined by MAX(focusGroupPriority, UIFocusGroupPrioritySelected).
 @property (nonatomic, readonly) UIFocusGroupPriority focusGroupPriority API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// If this property is present and returns `UIFocusItemDeferralModeNever`, the focus deferral will not be enabled again
+/// after the user engagement timeout has expired if this item is currently focused and programmatic focus updates pointing
+/// to this item will be executed immediatly. If it returns `UIFocusItemDeferralModeAlways` focus will always be deferred
+/// when this item is supposed to be focused.
+/// Does nothing when focus deferral is not supported on the platform.
+@property (nonatomic, readonly) UIFocusItemDeferralMode focusItemDeferralMode;
 
 /// If this returns YES, the focus item is considered transparent in terms of occlusion. Items that are behind it are focusable.
 /// This value is ignored when the item is focusable, in which case the item is never considered transparent.
diff -ruN /Applications/Xcode_16.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIPresentationController.h /Applications/Xcode_16.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIPresentationController.h
--- /Applications/Xcode_16.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIPresentationController.h	2024-07-13 14:23:37
+++ /Applications/Xcode_16.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIPresentationController.h	2024-08-02 00:42:04
@@ -118,7 +118,7 @@
 
 API_AVAILABLE(ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos)
 @interface UIPresentationController () <UITraitChangeObservable>
-@property (nonatomic, readonly) id<UITraitOverrides> traitOverrides API_UNAVAILABLE(watchos);
+@property (nonatomic, readonly) id<UITraitOverrides> traitOverrides API_AVAILABLE(ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos);
 @end
 
 NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_16.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITab.h /Applications/Xcode_16.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITab.h
--- /Applications/Xcode_16.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITab.h	2024-07-16 01:18:10
+++ /Applications/Xcode_16.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITab.h	2024-08-02 00:40:10
@@ -75,6 +75,14 @@
 /// For root tabs, the view controller must be non-nil.
 @property (nonatomic, strong, nullable, readonly) UIViewController *viewController;
 
+#pragma mark Managed Navigation
+
+/// The managing tab group for the tab. This returns the rootmost `UITabGroup` in the tab's parent hierarchy with an
+/// active `managingNavigationController`. This can be different to `parent` if the tab is nested in multiple
+/// levels of tab groups. If the tab does not belong to a hierarchy with a managing navigation controller, then this
+/// will return nil. Default is nil.
+@property (nonatomic, strong, nullable, readonly) UITabGroup *managingTabGroup;
+
 #pragma mark Customization
 
 /// Determines if the tab is currently hidden. Default is NO.
diff -ruN /Applications/Xcode_16.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITabBarController.h /Applications/Xcode_16.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITabBarController.h
--- /Applications/Xcode_16.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITabBarController.h	2024-07-12 04:49:15
+++ /Applications/Xcode_16.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITabBarController.h	2024-07-29 00:04:47
@@ -133,7 +133,20 @@
 /// Notifies the deleagte that the display order for the specified tab has been changed by the user.
 - (void)tabBarController:(UITabBarController *)tabBarController displayOrderDidChangeForGroup:(UITabGroup *)group API_AVAILABLE(ios(18.0), visionos(2.0)) API_UNAVAILABLE(tvos, watchos);
 
-
+/// Used with `UITabGroup.managingNavigationController`, this method allows the delegate to customize the displayed view controllers
+/// within the navigation stack for each level of selected tab. This method is called by the system if the selected tab in the `UITabBarController`
+/// belongs to or is in the hierarchy of a managing tab group (i.e. a `UITabGroup` with a non-nil `managingNavigationController`). By default,
+/// if this method is not implemented, the system will build the navigation stack by adding each tab's `viewController` into the hierarchy, if one exists.
+/// This is especially useful to hide certain view controllers when transitioning between compact and regular size classes.
+///
+/// @param tabBarController The tab bar controller managed by the delegate.
+/// @param tab The tab for which the displayed view controllers is being requested for by its `managingTabGroup`. Each tab in the selection hierarchy will be called once.
+/// @param proposedViewControllers The proposed view controllers for the given tab. In general, the propoesd view controller is a single-item array of the tab's viewController. If other view controllers are pushed onto the navigation stack, they will be part of the last (leafmost) tab's `proposedViewControllers` such that they are preserved between updates.
+///
+/// @return A list of view controllers represented by the tab in the navigation stack.
+- (NSArray<UIViewController *> *)tabBarController:(UITabBarController *)tabBarController
+                   displayedViewControllersForTab:(UITab *)tab
+                          proposedViewControllers:(NSArray<UIViewController *> *)proposedViewControllers API_AVAILABLE(ios(18.0), visionos(2.0)) API_UNAVAILABLE(tvos, watchos);
 
 - (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController API_AVAILABLE(ios(3.0));
 - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController;
diff -ruN /Applications/Xcode_16.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h /Applications/Xcode_16.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h
--- /Applications/Xcode_16.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h	2024-07-13 14:23:30
+++ /Applications/Xcode_16.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h	2024-08-02 00:41:58
@@ -719,11 +719,11 @@
 API_AVAILABLE(ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos)
 @interface UIView () <UITraitChangeObservable>
 
-@property (nonatomic, readonly) id<UITraitOverrides> traitOverrides API_UNAVAILABLE(watchos);
+@property (nonatomic, readonly) id<UITraitOverrides> traitOverrides API_AVAILABLE(ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos);
 
 /// Forces an immediate trait update for this view (and its view controller, if applicable) and any subviews,
 /// including any view controllers or views in its subtree. Any trait change callbacks are sent synchronously.
-- (void)updateTraitsIfNeeded API_UNAVAILABLE(watchos);
+- (void)updateTraitsIfNeeded API_AVAILABLE(ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos);
 
 @end
 
diff -ruN /Applications/Xcode_16.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h /Applications/Xcode_16.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h
--- /Applications/Xcode_16.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h	2024-07-12 05:05:34
+++ /Applications/Xcode_16.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h	2024-07-27 09:22:48
@@ -702,11 +702,11 @@
 API_AVAILABLE(ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos)
 @interface UIViewController () <UITraitChangeObservable>
 
-@property (nonatomic, readonly) id<UITraitOverrides> traitOverrides API_UNAVAILABLE(watchos);
+@property (nonatomic, readonly) id<UITraitOverrides> traitOverrides API_AVAILABLE(ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos);
 
 /// Forces an immediate trait update for this view controller and its view, including any view
 /// controllers and views in this subtree. Any trait change callbacks are sent synchronously.
-- (void)updateTraitsIfNeeded API_UNAVAILABLE(watchos);
+- (void)updateTraitsIfNeeded API_AVAILABLE(ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos);
 
 @end
 
diff -ruN /Applications/Xcode_16.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIWindowScene.h /Applications/Xcode_16.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIWindowScene.h
--- /Applications/Xcode_16.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIWindowScene.h	2024-07-12 04:49:09
+++ /Applications/Xcode_16.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIWindowScene.h	2024-08-02 00:40:12
@@ -54,7 +54,7 @@
 
 API_AVAILABLE(ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos)
 @interface UIWindowScene () <UITraitEnvironment, UITraitChangeObservable>
-@property (nonatomic, readonly) id<UITraitOverrides> traitOverrides API_UNAVAILABLE(watchos);
+@property (nonatomic, readonly) id<UITraitOverrides> traitOverrides API_AVAILABLE(ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos);
 @end
 
 #pragma mark - UIWindowSceneDelegate
Clone this wiki locally