400 Commits

Author SHA1 Message Date
Nobody
24a0ffbd03 Annotate various Delegate protocols as NS_SWIFT_UI_ACTOR
PiperOrigin-RevId: 708413470
2024-12-20 13:33:55 -08:00
Nobody
8f69468a2f Update Material iOS to compile for visionOS
PiperOrigin-RevId: 641364760
2024-06-07 14:52:13 -07:00
Randall Li
b4fea4a290 [NavigationController] Change deprecation warning to point at guidance and added "🕘 Schedule time to migrate" message.
PiperOrigin-RevId: 491972113
2022-11-30 11:27:00 -08:00
Jeff Verkoeyen
72dcc44075 Internal change
PiperOrigin-RevId: 468184898
2022-08-17 06:51:30 -07:00
Jeff Verkoeyen
b2bbd50350 Mark all To Be Deprecated APIs as Deprecated.
PiperOrigin-RevId: 460478209
2022-07-12 09:13:52 -07:00
Jeff Verkoeyen
7ae4498a05 [FlexibleHeader] Delete the unused canAlwaysExpandToMaximumHeight API.
PiperOrigin-RevId: 457775121
2022-06-28 11:11:40 -07:00
Jeff Verkoeyen
d78eda0b38 [AppBar] Annotate all APIs as To Be Deprecated.
Use a UINavigationController instead.

PiperOrigin-RevId: 457616203
2022-06-27 18:40:54 -07:00
Jeff Verkoeyen
d61cee6ea7 Enforce minimum OS on more targets.
PiperOrigin-RevId: 410752715
2021-11-18 03:03:55 -08:00
Jeff Verkoeyen
e021a66ace Remove all pre-iOS 12 logic.
PiperOrigin-RevId: 401080159
2021-10-05 15:10:04 -07:00
Jeff Verkoeyen
7ed2ed05ec Remove all pre-iOS 12 logic.
PiperOrigin-RevId: 401076088
2021-10-05 14:53:08 -07:00
Jeff Verkoeyen
111ed706b6 Remove all pre-iOS 12 logic.
PiperOrigin-RevId: 401065533
2021-10-05 13:44:51 -07:00
Jeff Verkoeyen
b5443f4df0 Remove all pre-iOS 12 logic.
PiperOrigin-RevId: 401011862
2021-10-05 10:16:01 -07:00
Jeff Verkoeyen
08051b7bda Remove all pre-iOS 12 logic.
PiperOrigin-RevId: 400798440
2021-10-04 13:20:55 -07:00
Jeff Verkoeyen
86a8c97dc7 Remove all pre-iOS 12 logic.
PiperOrigin-RevId: 400788645
2021-10-04 12:41:07 -07:00
Jeff Verkoeyen
c34de39e30 Internal change.
PiperOrigin-RevId: 397316843
2021-09-17 07:45:01 -07:00
Randall Li
502bc5d910 Ran a Swift formatter
PiperOrigin-RevId: 395947664
2021-09-10 09:48:14 -07:00
Cody Weaver
ce90d137bc [MDFInternationalization] Remove mdf_imageWithHorizontallyFlippedOrientation in favor of system API, imageWithHorizontallyFlippedOrientation.
PiperOrigin-RevId: 391987777
2021-08-20 07:33:33 -07:00
Cody Weaver
08d01596df [MultipleComponents] Remove mdf_effectiveUserInterfaceLayoutDirection in favor of the system API effectiveUserInterfaceLayoutDirection that was added in iOS 10.
PiperOrigin-RevId: 391307973
2021-08-17 09:30:47 -07:00
Jeff Verkoeyen
a49890be98 [AppBar] Annotate it as To Be Deprecated.
We will be dropping all runtime support for AppBar at the start of 2022q3, with intent to delete the component entirely one year later.

PiperOrigin-RevId: 390353332
2021-08-12 06:18:02 -07:00
Jeff Verkoeyen
9638b0bfa4 Annotate APIs with tvOS availability.
PiperOrigin-RevId: 368748687
2021-04-15 17:17:22 -07:00
Jeff Verkoeyen
a8e4831fd0 Flattening all unit tests into single directories as per convention.
PiperOrigin-RevId: 367426300
2021-04-08 07:33:29 -07:00
Jeff Verkoeyen
1abdf16760 Optimizing imports
PiperOrigin-RevId: 357185990
2021-02-12 07:36:41 -08:00
Jeff Verkoeyen
c53f44398e Optimizing imports
PiperOrigin-RevId: 357185618
2021-02-12 07:29:28 -08:00
Jeff Verkoeyen
63988b35da Optimizing imports
PiperOrigin-RevId: 356966165
2021-02-11 07:09:58 -08:00
Jeff Verkoeyen
1437067081 Optimizing imports
PiperOrigin-RevId: 356851164
2021-02-10 16:18:20 -08:00
Andrew Overton
b42de42c87 Additional requested docs changes
Closes https://github.com/material-components/material-components-ios/pull/10147

COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/10147 from andrewoverton:material-io-bugs-2 d0e70d8a8c4b66e6d3b22c2fbe3408a60d8771ee
PiperOrigin-RevId: 348026588
2020-12-17 08:33:58 -08:00
Andrew Overton
fb4d874f62 [Multiple components] Change component README ToCs to bold paragraph style
PiperOrigin-RevId: 346365613
2020-12-08 11:09:33 -08:00
Andrew Overton
62ccb5c72f [Multiple components] Audit recent docs changes, part 2
Closes https://github.com/material-components/material-components-ios/pull/10135

PiperOrigin-RevId: 345473101
2020-12-03 09:54:14 -08:00
Andrew Overton
8d8763ef71 [Multiple components] Audit recent docs changes, part 1
Closes https://github.com/material-components/material-components-ios/pull/10132

PiperOrigin-RevId: 345256835
2020-12-02 10:10:55 -08:00
Yarden Eitan
5a4f5baac6 [AppBar] Deprecate AppBar color themer APIs.
PiperOrigin-RevId: 333371966
2020-09-23 14:23:36 -07:00
Yarden Eitan
bf90886353 [AppBar] Deprecate API from MDCAppBarNavigationController.
PiperOrigin-RevId: 333366853
2020-09-23 14:08:37 -07:00
Bryan Oltman
da4b8f7c7f Fix mdc_elevationDidChangeBlock block parameter types for Xcode 12
PiperOrigin-RevId: 331843566
2020-09-15 13:39:15 -07:00
Jeff Verkoeyen
2445d52589 [AppBar] Remove redundant To Be Deprecated annotation.
PiperOrigin-RevId: 318503719
2020-06-26 10:59:09 -07:00
Andrew Overton
b205164477 Delete obsolete markdown files
As I've gone through and replaced all the READMEs I haven't always been good at deleting the markdown files that were stitched together to make the old READMEs. This PR removes all the ones I forgot to remove. All the relevant material in these files is already in the new READMEs, so we're not losing anything by doing this.

Closes https://github.com/material-components/material-components-ios/pull/10029

COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/10029 from andrewoverton:delete-unused-docs 65ea55253af300ea7a4c13ea4ce14976097a6253
PiperOrigin-RevId: 318079032
2020-06-24 09:31:01 -07:00
Jeff Verkoeyen
b78737be48 [AppBar] Inject AppBars after view controllers have been added to the navigation controller.
Before this change, it was never possible to interact with the navigationController property in a pushed view controller's viewDidLoad property when using MDCAppBarNavigationController. This behavior is surprising for folks using UINavigationController, which does allow you to access navigationController from within viewDidLoad.

This expectation is an anti-pattern (e.g. viewDidLoad is never guaranteed to be invoked after a view controller has been pushed onto a navigationController stack), but the goal of MDCAppBarNavigationController is to provide a drop-in replacement for UINavigationController so our intent is to align behaviors, even if they're not necessarily for the right reasons.

All that being said, the change introduced in this CL simply swaps the ordering of pushing the view controller and injecting the AppBar, such that the injection now happens after the super implementation of pushViewController has been invoked. This allows the viewDidLoad logic to be invoked after navigationController has been initialized on the view controller.

The reason we were doing it the other way before was so that the AppBar could intercept the relevant status bar appearance events. We work around that requirement in this change by invoking setNeedsStatusBarAppearanceUpdate and setNeedsUpdateOfHomeIndicatorAutoHidden immediately after injecting the AppBar.

PiperOrigin-RevId: 313410464
2020-05-27 10:06:04 -07:00
Galia Kaufman
09171d15c7 [AppBar] Fix a failing snapshot test
PiperOrigin-RevId: 312260009
2020-05-19 05:29:15 -07:00
Jeff Verkoeyen
e479b366e7 [AppBar] Roll-back "inject AppBars after view controllers have been added to the navigation controller."
PiperOrigin-RevId: 311550067
2020-05-14 09:47:14 -07:00
Jeff Verkoeyen
c0b4ff9cb3 [AppBar] Inject AppBars after view controllers have been added to the navigation controller.
Before this change, it was never possible to interact with the navigationController property in a pushed view controller's viewDidLoad property when using MDCAppBarNavigationController. This behavior is surprising for folks using UINavigationController, which does allow you to access navigationController from within viewDidLoad.

This expectation is an anti-pattern (e.g. viewDidLoad is never guaranteed to be invoked after a view controller has been pushed onto a navigationController stack), but the goal of MDCAppBarNavigationController is to provide a drop-in replacement for UINavigationController so our intent is to align behaviors, even if they're not necessarily for the right reasons.

All that being said, the change introduced in this CL simply swaps the ordering of pushing the view controller and injecting the AppBar, such that the injection now happens after the super implementation of pushViewController has been invoked. This allows the viewDidLoad logic to be invoked after navigationController has been initialized on the view controller.

The reason we were doing it the other way before was so that the AppBar could intercept the relevant status bar appearance events. We work around that requirement in this change by invoking setNeedsStatusBarAppearanceUpdate and setNeedsUpdateOfHomeIndicatorAutoHidden immediately after injecting the AppBar.

PiperOrigin-RevId: 311342757
2020-05-13 09:29:59 -07:00
Jeff Verkoeyen
dbb9ab1170 [AppBar] Add NavigationController example with AppBar initially hidden.
Note that this new example demonstrates a bug in which the AppBar is not, in fact, hidden when presented.

PiperOrigin-RevId: 311104930
2020-05-13 14:41:30 +00:00
Jeff Verkoeyen
a502ce66b9 [FlexibleHeader] Ensure that the FlexibleHeader's position reacts to safeAreaInsets changes when hidden.
## The bug

Repro steps:

1. Open MDCDragons on an iPhone with a notch.
2. Open App Bar -> Presented hidden.
3. Present the App Bar.
4. Observe.

Expected behavior:
- The AppBar is completely hidden.

Actual behavior:
- The AppBar is partially hidden.

## Root cause analysis

When the FlexibleHeader is hidden using shiftHeaderOffScreenAnimated:, the expectation is that the header will be shifted entirely off-screen. If this method is invoked before the FlexibleHeader is attached to a window hierarchy, then the offset applied to shift the header off-screen may not correctly include the necessary safe area insets to hide the header fully.

When flexibleHeaderSafeAreaTopSafeAreaInsetDidChange was being invoked after the safe area insets were made available to the FlexibleHeader, we were not taking into consideration whether the FlexibleHeader was supposed to be hidden which resulted in the FlexibleHeader getting stuck in a partially hidden state.

## The fix

In flexibleHeaderSafeAreaTopSafeAreaInsetDidChange, we now check whether the FlexibleHeader wants to be hidden and, if it does (and we're not already animating it), we immediately snap the FlexibleHeader to the new necessary offset.

PiperOrigin-RevId: 311104051
2020-05-13 14:40:20 +00:00
Jeff Verkoeyen
97702e8b0c [AppBar] Make the presented hidden example show a new view controller each time.
The example was reusing the same view controller instance after each presentation, which made it difficult to consistently test the same buggy behavior.

PiperOrigin-RevId: 310980123
2020-05-12 15:11:46 -04:00
Jeff Verkoeyen
3b99d09c69 [AppBar] Add a presented hidden example.
This example demonstrates a bug where the AppBar does not appear to respect shiftHeaderOffScreenAnimated: when the shiftBehavior is set to hideable.

PiperOrigin-RevId: 310898136
2020-05-11 06:18:08 -07:00
Jeff Verkoeyen
459066d00e [AppBar] Don't hide the navigation bar in AppBarNavigationControllerExample.
This example doesn't actually manage its own app bar; it only presents one. This fixes a bug where the example did not show a navigation bar at all.

PiperOrigin-RevId: 310870101
2020-05-11 02:13:39 -07:00
Jeff Verkoeyen
580a1ecbde [AppBar] Clarify the purpose of the example supplemental view controllers.
The prior names of composed vs inherited didn't meaningfully translate to the intended purpose of the two view controllers, which is to provide harnesses within which the flexible header can be placed either as a child or as a sibling to its tracking scroll view. This distinction is important because the flexible header behaves differently when it is a child of its tracking scroll view, as is the case when using UITableViewController.

PiperOrigin-RevId: 310869953
2020-05-11 02:11:26 -07:00
Jeff Verkoeyen
783c9de40e [AppBar] Extract a sample app bar view controller to supplemental.
This controller will be reused in other examples.

PiperOrigin-RevId: 310869906
2020-05-11 02:08:50 -07:00
Andrew Overton
7814b0c460 Replace App Bar docs
This PR replaces the AppBar README. The content is mostly the same, I just had to restructure it in order to fit the new template.

Closes https://github.com/material-components/material-components-ios/pull/9981

PiperOrigin-RevId: 309097690
2020-04-29 14:32:52 -07:00
Nobody
e035d70f50 Project import generated by Copybara.
PiperOrigin-RevId: 309039129
2020-04-29 17:00:59 +00:00
Wenyu Zhang
a3381717f7
Fix the bazel BUILD files and snapshot that were restored unintentionally.(#9983) 2020-04-29 11:00:00 -04:00
Jeff Verkoeyen
25471afea0 Rename "flaky" to "skip_snapshots".
PiperOrigin-RevId: 308259307
2020-04-24 08:34:12 -07:00
Jeff Verkoeyen
776dacc084 [AppBar] Mark the webview examples as flaky.
PiperOrigin-RevId: 308252919
2020-04-24 07:51:05 -07:00