Skip to content

Commit

Permalink
Annotate APIs as only supporting iOS 12+.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 358926113
  • Loading branch information
jverkoey authored and material-automation committed Feb 23, 2021
1 parent 9c91e26 commit b190b1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Expand Up @@ -18,6 +18,7 @@ import MaterialComponents.MaterialBottomNavigation_BottomNavigationController
import MaterialComponents.MaterialBottomNavigation_Theming
import MaterialComponents.MaterialContainerScheme

@available(iOS 12.0, *)
class BottomNavigationHideShowExample: UIViewController {
static let cellReuseIdentifier = "cell"
static let numberOfCells = 40
Expand Down Expand Up @@ -73,6 +74,7 @@ class BottomNavigationHideShowExample: UIViewController {
}
}

@available(iOS 12.0, *)
extension BottomNavigationHideShowExample: UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return BottomNavigationHideShowExample.numberOfCells
Expand All @@ -88,6 +90,7 @@ extension BottomNavigationHideShowExample: UITableViewDataSource {
}

// MARK: Catalog by convention
@available(iOS 12.0, *)
extension BottomNavigationHideShowExample {
@objc class func catalogMetadata() -> [String: Any] {
return [
Expand All @@ -96,9 +99,14 @@ extension BottomNavigationHideShowExample {
"presentable": false,
]
}

@objc class func minimumOSVersion() -> OperatingSystemVersion {
return OperatingSystemVersion(majorVersion: 12, minorVersion: 0, patchVersion: 0)
}
}

// MARK: Snapshot Testing by Convention
@available(iOS 12.0, *)
extension BottomNavigationHideShowExample {
@objc func testAdjustsContentInsetsForHiddenBottomBar() {
toggleBottomBar(animated: false)
Expand Down
Expand Up @@ -37,6 +37,7 @@
preserved. Upon decoding, if the view controllers array contains a reference to the previous
selected view controller, that view controller is set to selected.
*/
API_AVAILABLE(ios(12.0))
@interface MDCBottomNavigationBarController : UIViewController <MDCBottomNavigationBarDelegate>

/**
Expand Down

0 comments on commit b190b1c

Please sign in to comment.