Skip to content

Commit

Permalink
[FlexibleHeader] Delete the unused canAlwaysExpandToMaximumHeight API.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 457775121
  • Loading branch information
jverkoey authored and material-automation committed Jun 28, 2022
1 parent 62e4f25 commit 7ae4498
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 251 deletions.
12 changes: 0 additions & 12 deletions MaterialComponents.podspec
Expand Up @@ -838,18 +838,6 @@ Pod::Spec.new do |mdc|
extension.dependency "MaterialComponents/FlexibleHeader+ShiftBehavior"
end

mdc.subspec "FlexibleHeader+CanAlwaysExpandToMaximumHeight" do |extension|
extension.ios.deployment_target = '10.0'
extension.public_header_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.h"
]
extension.source_files = [
"components/#{extension.base_name.split('+')[0]}/src/#{extension.base_name.split('+')[1]}/*.{h,m}"
]

extension.dependency "MaterialComponents/#{extension.base_name.split('+')[0]}"
end

# HeaderStackView

mdc.subspec "HeaderStackView" do |component|
Expand Down
2 changes: 0 additions & 2 deletions components/AppBar/examples/AppBarAnimatedGlitchExample.swift
Expand Up @@ -16,7 +16,6 @@ import CoreGraphics
import UIKit
import MaterialComponents.MaterialAppBar
import MaterialComponents.MaterialAppBar_Theming
import MaterialComponents.MaterialFlexibleHeader_CanAlwaysExpandToMaximumHeight
import MaterialComponents.MaterialTabs
import MaterialComponents.MaterialContainerScheme

Expand Down Expand Up @@ -159,7 +158,6 @@ class AppBarAnimatedJumpExample: UIViewController {
// Give the tab bar enough height to accomodate all possible item appearances.
appBarViewController.headerView.minMaxHeightIncludesSafeArea = false
appBarViewController.inferTopSafeAreaInsetFromViewController = true
appBarViewController.headerView.canAlwaysExpandToMaximumHeight = true
appBarViewController.headerView.sharedWithManyScrollViews = true

appBarViewController.headerView.minimumHeight = 56
Expand Down
2 changes: 0 additions & 2 deletions components/AppBar/examples/AppBarGlitchExample.swift
Expand Up @@ -16,7 +16,6 @@ import CoreGraphics
import UIKit
import MaterialComponents.MaterialAppBar
import MaterialComponents.MaterialAppBar_Theming
import MaterialComponents.MaterialFlexibleHeader_CanAlwaysExpandToMaximumHeight
import MaterialComponents.MaterialTabs
import MaterialComponents.MaterialContainerScheme

Expand Down Expand Up @@ -115,7 +114,6 @@ class AppBarJumpExample: UIViewController {
// Give the tab bar enough height to accomodate all possible item appearances.
appBarViewController.headerView.minMaxHeightIncludesSafeArea = false
appBarViewController.inferTopSafeAreaInsetFromViewController = true
appBarViewController.headerView.canAlwaysExpandToMaximumHeight = true
appBarViewController.headerView.sharedWithManyScrollViews = true

appBarViewController.headerView.minimumHeight = 56
Expand Down
Expand Up @@ -16,7 +16,6 @@ import CoreGraphics
import UIKit
import MaterialComponents.MaterialAppBar
import MaterialComponents.MaterialAppBar_Theming
import MaterialComponents.MaterialFlexibleHeader_CanAlwaysExpandToMaximumHeight
import MaterialComponents.MaterialTabs
import MaterialComponents.MaterialContainerScheme

Expand Down Expand Up @@ -159,7 +158,6 @@ class AppBarInheritedAnimatedJumpExample: UIViewController {
// Give the tab bar enough height to accommodate all possible item appearances.
appBarViewController.headerView.minMaxHeightIncludesSafeArea = false
appBarViewController.inferTopSafeAreaInsetFromViewController = true
appBarViewController.headerView.canAlwaysExpandToMaximumHeight = true
appBarViewController.headerView.sharedWithManyScrollViews = true

appBarViewController.headerView.minimumHeight = 56
Expand Down
6 changes: 1 addition & 5 deletions components/AppBar/examples/AppBarManualTabsExample.swift
Expand Up @@ -16,15 +16,12 @@ import CoreGraphics
import UIKit
import MaterialComponents.MaterialAppBar
import MaterialComponents.MaterialAppBar_Theming
import MaterialComponents.MaterialFlexibleHeader_CanAlwaysExpandToMaximumHeight
import MaterialComponents.MaterialTabs
import MaterialComponents.MaterialContainerScheme

// An example that demonstrates the behavior of an App Bar with Tabs and manually swapped tab view
// controllers. This example is distinct from a typical tab bar view controller in that it does not
// make use of a horizontally-paging scroll view. This example also makes use of the
// canAlwaysExpandToMaximumHeight API to allow the header to maintain its expanded state when
// swapping between tabs.
// make use of a horizontally-paging scroll view.
class AppBarManualTabsExample: UIViewController {

lazy var appBarViewController: MDCAppBarViewController = self.makeAppBar()
Expand Down Expand Up @@ -119,7 +116,6 @@ class AppBarManualTabsExample: UIViewController {
// Give the tab bar enough height to accomodate all possible item appearances.
appBarViewController.headerView.minMaxHeightIncludesSafeArea = false
appBarViewController.inferTopSafeAreaInsetFromViewController = true
appBarViewController.headerView.canAlwaysExpandToMaximumHeight = true
appBarViewController.headerView.sharedWithManyScrollViews = true

appBarViewController.headerView.minimumHeight = 56
Expand Down
Expand Up @@ -14,9 +14,12 @@

#import <UIKit/UIKit.h>

#import "MaterialFlexibleHeader+CanAlwaysExpandToMaximumHeight.h"
#import "MaterialFlexibleHeader.h"
#import "MaterialFlexibleHeader+ShiftBehaviorEnabledWithStatusBar.h"
#import "MDCFlexibleHeaderView+ShiftBehavior.h"
#import "MDCFlexibleHeaderView.h"
#import "MDCFlexibleHeaderViewController.h"
#import "MDCFlexibleHeaderViewLayoutDelegate.h"
#import "MDCFlexibleHeaderShiftBehavior.h"
#import "MDCFlexibleHeaderShiftBehaviorEnabledWithStatusBar.h"

#import "supplemental/FlexibleHeaderConfiguratorControlItem.h"

Expand All @@ -35,7 +38,6 @@
FlexibleHeaderConfiguratorFieldMinimumHeight,
FlexibleHeaderConfiguratorFieldMaximumHeight,
FlexibleHeaderConfiguratorFieldMinMaxHeightIncludeSafeArea,
FlexibleHeaderConfiguratorFieldCanAlwaysExpandToMaximumHeight,
} FlexibleHeaderConfiguratorField;

static const UITableViewStyle kStyle = UITableViewStyleGrouped;
Expand Down Expand Up @@ -168,10 +170,6 @@ - (void)field:(FlexibleHeaderConfiguratorField)field didChangeValue:(NSNumber *)
case FlexibleHeaderConfiguratorFieldMinMaxHeightIncludeSafeArea:
headerView.minMaxHeightIncludesSafeArea = [value boolValue];
break;

case FlexibleHeaderConfiguratorFieldCanAlwaysExpandToMaximumHeight:
headerView.canAlwaysExpandToMaximumHeight = [value boolValue];
break;
}
}

Expand Down Expand Up @@ -280,9 +278,6 @@ - (NSNumber *)valueForField:(FlexibleHeaderConfiguratorField)field {

case FlexibleHeaderConfiguratorFieldMinMaxHeightIncludeSafeArea:
return @(self.fhvc.headerView.minMaxHeightIncludesSafeArea);

case FlexibleHeaderConfiguratorFieldCanAlwaysExpandToMaximumHeight:
return @(self.fhvc.headerView.canAlwaysExpandToMaximumHeight);
}
}

Expand Down Expand Up @@ -426,8 +421,6 @@ - (void)viewDidLoad {
sliderItem(@"Maximum", FlexibleHeaderConfiguratorFieldMaximumHeight),
switchItem(@"Min / max height includes Safe Area",
FlexibleHeaderConfiguratorFieldMinMaxHeightIncludeSafeArea),
switchItem(@"Can always expand to maximum height",
FlexibleHeaderConfiguratorFieldCanAlwaysExpandToMaximumHeight)
]);

NSMutableArray *fillerItems = [NSMutableArray array];
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 7ae4498

Please sign in to comment.