Clients may want to support ripple throughout their application and be using MDCBottomAppBar. Since the bottom app bar does not expose it's navigation bar we need to have a pass through property to enable the ripple in the navigation bar. Users shouldn't get any ripple effect on the bar itself so we don't need any additional support other than what the navigation bar has. If clients want to enable it on the floating action button that is exposed so they can do so. This change also allows them to customize the ripple color.
PiperOrigin-RevId: 306278679
The bottom app bar needs an API so clients can hook-in to trait collection changes. This additionally passes the bottom app bar as a parameter so clients can modify the bottom app bar within the block.
Closes#7927
[BottomAppBar] Fix it/bottom app bar cut out (#5958)
### Context
FABs can be circular or pill-shaped. As described in #5414, the cutout on BottomAppBar does not take into account pill-shaped FABs.
### The Problem
The UIBezierPath used in the current implementation draws a half circle where the FAB appears. For pill-shaped FABS, this doesn't work, as the cutout needs to made up of two quarter circle and a line connecting them.
### The Fix
I implemented a UIBezierPath that is made up of two quarter circles connected by a line, as well as the remainder of the rectangle that makes up the BottomAppBar's background. By doing so, I was able to provide **one** bezier path for both circular and pill-shaped cutouts, and **one** bezier path for a non-cutout version of the rectangle. This results in a smooth animation between the cutout and non-cutout state.
See https://stackoverflow.com/a/9522806 for an explanation of why the cutout and non-cutout bezier paths need to have the same general structure (e.g. number of path elements, and element types).
### Context
FABs can be circular or pill-shaped. As described in #5414, the cutout on BottomAppBar does not take into account pill-shaped FABs.
### The Problem
The UIBezierPath used in the current implementation draws a half circle where the FAB appears. For pill-shaped FABS, this doesn't work, as the cutout needs to made up of two quarter circle and a line connecting them.
### The Fix
I implemented a UIBezierPath that is made up of two quarter circles connected by a line, as well as the remainder of the rectangle that makes up the BottomAppBar's background. By doing so, I was able to provide **one** bezier path for both circular and pill-shaped cutouts, and **one** bezier path for a non-cutout version of the rectangle. This results in a smooth animation between the cutout and non-cutout state.
See https://stackoverflow.com/a/9522806 for an explanation of why the cutout and non-cutout bezier paths need to have the same general structure (e.g. number of path elements, and element types).
{MDC iOS} No longer using `-init` for Color Scheme.
Based on the discussions in go/mdc-ios-theming, we should not use the `-init` default initializer. Instead, we should use an explicit set of defaults.
Search regex: '\[\[MDCSemanticColorScheme alloc\] init\]'
Replacing all non-integral, single-precision floating point literals with double-precision values explicitly cast to CGFloat. For example, `0.1f` should become `(CGFloat)0.1`.
Regex used:
```
([0-9]*\.)([0-9]*?)([1-9]+)([0-9]*?)[fF]
```
PiperOrigin-RevId: 220683126
### Context
As of #5155 our animation didn't have an equal number of points in the bezierPath when there was or wasn't a FAB. When doing an animation between two `CGPath`s the points need to be the same in order to animate correctly.
### The problem
There were not an equal number of points between both paths so the animation didn't know how to map the values in each path to each other.
### The fix
Update the path to render correctly by adding a point to the `withoutCut` function.
### Related bug
#5603
### Videos
| Before | After |
| - | - |
|||
**_note_** Example Code snippet
```objc
// In MDCBottomAppBarAttributes.h
kMDCFloatingButtonExitDuration = 2.180
kMDCFloatingButtonEnterDuration = 2.270
// In example file
[bottomAppBar.floatingButton removeFromSuperview];
// toggle between
BOOL animate = true
[bottomAppBar setFloatingButtonHidden:animate animated:YES];
animate = !animate
```
Removes the need to copy-paste stanzas from other files anymore as we'll rely on #4478 to generate the correct stanza for us instead.
This was an automated change generated by running a find-and-replace regular expression:
```
/\*
Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
Licensed under the Apache License, Version 2\.0 \(the "License"\);
you may not use this file except in compliance with the License\.
You may obtain a copy of the License at
http://www\.apache\.org/licenses/LICENSE-2\.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
See the License for the specific language governing permissions and
limitations under the License\.
\*/
```
```
/\*
Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
Licensed under the Apache License, Version 2\.0 \(the "License"\);
you may not use this file except in compliance with the License\.
You may obtain a copy of the License at
http://www\.apache\.org/licenses/LICENSE-2\.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
See the License for the specific language governing permissions and
limitations under the License\.
\*/
```
```
/\*
Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
Licensed under the Apache License, Version 2\.0 \(the "License"\);
you may not use this file except in compliance with the License\.
You may obtain a copy of the License at
http://www\.apache\.org/licenses/LICENSE-2\.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
See the License for the specific language governing permissions and
limitations under the License\.
\*/
```
```
// Copyright $1-present the Material Components for iOS authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
```
* [BottomAppBar] Add simple color themer
Adding a color themer that can apply an id<MDCColorScheme> to the
BottomAppBar. Uses the `primaryColor` as the bar's background color to
match the behavior of MDCNavigationBarColorThemer.
Closes#2279
* Adjusting documentation