Repro case:
Add the following code to a view controller with an App Bar:
```swift
class SomeObject {
@objc func someEvent() {
}
}
let object = SomeObject()
self.navigationItem.rightBarButtonItem =
UIBarButtonItem(title: "Right", style: .done, target: object, action: #selector(SomeObject.someEvent))
```
Tap the button.
Expected behavior: the someEvent method is invoked.
Actual behavior: crash due to unrecognized selector `methodSignatureForSelector:`.
After this change the behavior works as expected, with the caveat being that we are not able to pass the button instance along as a third argument to pure Swift classes. The implication of this is that pure Swift classes will not be able to present popovers from the provided item instance. Supporting this case will require turning the pure Swift class into an Objective-C compatible class.
Closes https://github.com/material-components/material-components-ios/issues/2981
### Release notes
`canAlwaysExpandToMaximumHeight` is a new behavior on the Flexible Header component that is available through an extension target, `FlexibleHeader+CanAlwaysExpandToMaximumHeight`.
Enabling this behavior on a flexible header instance will allow the flexible header to expand to its maximum height even when the flexible header is floating in front of its content.
---
We intend to keep usage of this API fairly restricted internally, so we have added the behavior as a separate target that we'll whitelist internally to clients. The API is still supported by the typical API contract for public clients.
The behavior is implemented using the same shift accumulator logic that enables header shifting. When the accumulator is positive, we're shifting off-screen. When the accumulator is negative, we're expanding the height of the flexible header.
Closes https://github.com/material-components/material-components-ios/issues/4393
Remove all instances of MDCFlatButton within [Dialogs] component
Replace with MDCTextButtonThemer and MDCButton
MDCFlatButton is the old API and MDCTextButtonThemer/MDCButton are the modern APIs.
Closes#3914
Added support for shaping a bottom sheet in multiple states.
A bottom sheet can either be collapsed (partially visible but not full screen) and expanded (sheet covering the whole screen). We wanted to allow support for shaping a sheet differently for each of its states.
Therefore the bottom sheet state was exposed rather than hidden and an API was defined to allow changing the shape for each state.
* [TextFields] Adding todos for #4331
* [TextFields] Creating simple equality files.
* [TextFields] Prevents fonts that are almost the same but not quite from messing up the rendering.
* [Typography] Adding tests for font equality.
* [TextFields] Formatting.
* [Typography] Adding Math to the bazel file.
* [Typography] PR feedback.
* [Typography] PR feedback.
* [Typography] Comment.
* [Typography] PR feedback.
* [Typography] PR feedback.
* [Typography] Updating podspec.
* [Typography] Asserts for bazel.
* [Typography] Logging for tests.
* [Typography] Loggin.g
* [Typography] Removing logging and the deeper check.
* [Typography] Making simple equality a category.
* [TextFields] Using new method.
* [TextFields] Adding todos for #4331
* [TextFields] Creating simple equality files.
* [TextFields] Prevents fonts that are almost the same but not quite from messing up the rendering.
* [Typography] Adding tests for font equality.
* [TextFields] Formatting.
* [Typography] Adding Math to the bazel file.
* [Typography] PR feedback.
* [Typography] PR feedback.
* [Typography] Comment.
* [Typography] PR feedback.
* [Typography] PR feedback.
* [Typography] Updating podspec.
* [Typography] Asserts for bazel.
* [Typography] Logging for tests.
* [Typography] Loggin.g
* [Typography] Removing logging and the deeper check.
This discourages depending on all of a component's extensions and aligns our targets more closely with how we expect them to be imported and depended upon.
This is a breaking change.
Pivotal story: https://www.pivotaltracker.com/story/show/157118721