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
Context:
Due to changes in the Swift runtime over the past years, methods that are considered "optional" in Objective-C need to have @objc annotations in order for Objective-C to be able to perform `respondsToSelector:` invocations.
Problem:
Many of our examples had not annotated their `catalogShouldHideNavigation` methods with the `@objc` annotation, causing the Catalog to wrap the examples in a container app bar view controller. The reason most of these examples would implement `catalogShouldHideNavigation` is because they are managing their own navigation (e.g. to demonstrate AppBar functionality), so this would often result in duplicate AppBars appearing in the example.
The fix:
All `catalogShouldHideNavigation` Swift methods have been annotated with `@objc`.
Fixes https://github.com/material-components/material-components-ios/issues/7576
Fixes https://github.com/material-components/material-components-ios/issues/7578
As part of #7510 we need to remove our usage of the typography themer and color themer within our examples. This removes the usages of both for all swift examples.
We need to add @objc annotations to colorScheme and typographyScheme instances in our Swift examples, because we moved to Swift 4.2, the respondsToSelector won't find `setColorScheme:` and `setTypographyScheme:` setters otherwise.
This is a follow up PR for #7166 adds @objc annotations to Swift catalogMetadata() methods, because the Swift 4 compiler no longer attempts to infer what methods should be visible to Objective-C. As a result of this change in the compiler, no Swift examples were showing up in Dragons after #7166. See this article: https://useyourloaf.com/blog/objc-warnings-upgrading-to-swift-4/ for additional context.
This refactors the "simple" example table view controllers used in a bunch of these examples into two types: a "composed" one which creates its own table view and an "inherited" one which subclasses UITableViewController. They behave differently, so this makes that explicit and also reduces some code duplication.
[MDC Swift] Add guards for Swift 4.2+
On Xcode 10, using Tulsi, the unit test target cannot be built because much of the Swift code does
not have the correct syntax for Swift 4.2+. Adding pragmas to allow continued support for Xcode
9.4.2 and Xcode 10.
PiperOrigin-RevId: 220399935
This example was provided by @babakbo in https://github.com/material-components/material-components-ios/issues/5156
The purpose of this example is to be able to test the behavior of multiple tabs that are added and removed from the view controller hierarchy as the selected tab changes. This is different from the typical tabs usage, which relies on a horizontally-paging scroll view to allow the tabs to be switched between.
In addition, this example is demonstrating the use of the canAlwaysExpandToMaximumHeight API which has been provided specifically for @babako and team.
## Screenshots
