Skip to content

Commit 9638b0b

Browse files
Jeff Verkoeyenmaterial-automation
authored andcommitted
Annotate APIs with tvOS availability.
PiperOrigin-RevId: 368748687
1 parent 242f895 commit 9638b0b

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed

components/AppBar/src/MDCAppBarViewController.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
MDCAppBarViewController is a flexible header view controller that manages a navigation bar and
2424
header stack view in order to provide the Material Top App Bar user interface.
2525
*/
26+
API_UNAVAILABLE(tvos, watchos)
2627
@interface MDCAppBarViewController : MDCFlexibleHeaderViewController
2728

2829
/**
@@ -83,6 +84,7 @@
8384
@warning This API will be deprecated in favor of MDCAppBarViewController. Learn more at
8485
https://github.com/material-components/material-components-ios/blob/develop/components/AppBar/docs/migration-guide-appbar-appbarviewcontroller.md
8586
*/
87+
API_UNAVAILABLE(tvos, watchos)
8688
@interface MDCAppBar : NSObject
8789

8890
/**

components/AppBar/src/MDCAppBarViewControllerAccessibilityPerformEscapeDelegate.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
A delegate that can be implemented in order to respond to events specific to
2121
MDCAppBarViewController.
2222
*/
23+
API_UNAVAILABLE(tvos, watchos)
2324
@protocol MDCAppBarViewControllerAccessibilityPerformEscapeDelegate <NSObject>
2425
@required
2526

components/BottomNavigation/src/MDCBottomNavigationBar.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ traitCollectionDidChange:. The block is called after the call to the superclass.
260260

261261
@end
262262

263-
#if MDC_AVAILABLE_SDK_IOS(13_0)
263+
#if MDC_AVAILABLE_SDK_IOS(13_0) && !TARGET_OS_TV
264264
/**
265265
This component supports UIKit's Large Content Viewer. It is recommended that images associated with
266266
each tab bar item be backed with a PDF image with "preserve vector data" enabled within the assets
@@ -276,6 +276,7 @@ traitCollectionDidChange:. The block is called after the call to the superclass.
276276
For more details on the Large Content Viewer see:
277277
https://developer.apple.com/videos/play/wwdc2019/261/
278278
*/
279+
API_UNAVAILABLE(tvos, watchos)
279280
@interface MDCBottomNavigationBar (UILargeContentViewerInteractionDelegate) <
280281
UILargeContentViewerInteractionDelegate>
281282
@end

components/Dialogs/src/MDCAlertController.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,14 +400,18 @@ typedef NS_ENUM(NSInteger, MDCContentHorizontalAlignment) {
400400
401401
Defaults to UIKit's supportedInterfaceOrientations.
402402
*/
403-
@property(nonatomic) UIInterfaceOrientationMask supportedInterfaceOrientationsOverride;
403+
@property(nonatomic)
404+
UIInterfaceOrientationMask supportedInterfaceOrientationsOverride API_UNAVAILABLE(tvos, watchos)
405+
;
404406

405407
/**
406408
The interface orientation to use when presenting the alert.
407409
408410
Defaults to UIKit's preferredInterfaceOrientationForPresentation.
409411
*/
410-
@property(nonatomic) UIInterfaceOrientation preferredInterfaceOrientationForPresentationOverride;
412+
@property(nonatomic)
413+
UIInterfaceOrientation preferredInterfaceOrientationForPresentationOverride API_UNAVAILABLE(
414+
tvos, watchos);
411415

412416
/**
413417
The transition style to use when presenting the view controller override.

components/FlexibleHeader/src/MDCFlexibleHeaderViewController.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
4040
scrollView.delegate = headerViewController;
4141
*/
42+
API_UNAVAILABLE(tvos, watchos)
4243
@interface MDCFlexibleHeaderViewController
4344
: UIViewController <UIScrollViewDelegate, UITableViewDelegate>
4445

components/Tabs/src/TabBarView/MDCTabBarView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ __attribute__((objc_subclassing_restricted)) @interface MDCTabBarView : UIScroll
255255

256256
@end
257257

258-
#if MDC_AVAILABLE_SDK_IOS(13_0)
258+
#if MDC_AVAILABLE_SDK_IOS(13_0) && !TARGET_OS_TV
259259
/**
260260
This component supports UIKit's Large Content Viewer. It is recommended that images associated with
261261
each tab bar item be backed with a PDF image with "preserve vector data" enabled within the assets

0 commit comments

Comments
 (0)