The CollectionListCellExampleTypicalUse was using "Lists" as its top-level breadcrumb instead of "List Items", which was causing it to appear in its own category in the catalog. This does not appear to be intentional, so this change aligns the example with the component's conventional name.
PiperOrigin-RevId: 306422785
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.
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
The example showing how to use MDF Internationalization's language
direction code was somewhat inefficient, calling the method twice on the
same string. Instead it should be called once and the result checked.
In manual testing, dropped overhead from 0.8% of Main Thread time to
0.4% while scrolling the example.
## The problem:
The Stereo cell example wasn't using the List Themer.
## The solution:
Make the Stereo cell example use the List Themer.
I didn't include before and after screenshots because there is no visual change.
Closes#5501.
There were two issues:
1) the -titleLabel and -detailLabel UILabels were not getting their -textColor set, despite the helper methods -defaultTitleLabelTextColor and -defaultDetailLabelTextColor defined in the file.
2) within -prepareForReuse, the -textColor and -numberOfLines properties on the -titleLabel and -detailLabel UILabels weren't getting reset.
These changes generalize List themers so that for the List component there is one themer per subsystem, each with one method per List Item class.
Closes#5356
* Four prototypes: (#4382)
Two have manual layout and two have auto layout.
Two have configurable supporting views, two don't.
* Manual Layout prototype 3
* Fix project by adding initial List Item Cell Demo
* Add other List Item example
* Make view properties readonly and make cellWidth private
* Make cellWidth public again and make more efficient
* Rename MDCListItemCell to MDCBasicStereoCell
* Rename to MDCSelfSizingStereoCell
* Small nits
* Set cellWidth in preferredLayoutAttributes
* Some Jeff feedback
* Extract layout code
* Delete all the prototypes from forever ago
* Fix copyright messages
* Get rid of __IPHONE_11_0 checks
* PR feedback
* Move layout to its own file
* Add dependencies
* Tweak documentation
* Fix copyright stanzas
* Clang format
* Move numberOfLines logic to cell
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.
```
We can now make use of @available throughout our codebase.
We support Xcode 9 and up, which includes the iOS 11 SDK. This means we can remove any guards for SDKs prior to iOS 11.
This was cleaned up by running a global find-and-replace with the following regular expression:
```
Find:#if defined\(__IPHONE_11_0\) && \(__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0\)\n(.+if \(@available\(iOS 11.0, \*\)\) \{(?:.|\n)*?)(?:#else(?:.|\n)*?)?\n#endif
Replace:$1
```
With some additional cleanup for stragglers that didn't match this pattern. Note that else clauses were intentionally dropped.
Closes https://github.com/material-components/material-components-ios/issues/4909
Pivotal: https://www.pivotaltracker.com/story/show/155597168
This example uses auto layout constraints to show a way to use UICollectionViewCells with a vanilla UICollectionViewController to achieve a List Cell that is self-sizing, supports dynamic type, RTL, and orientation changes.
This example also supports the correct layout with and without an image set in the cell, and also with an unset titleLabel.text and an unset detailsLabel.text.