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.
```
Removes the need to copy-paste stanzas from other files anymore as we'll rely on https://github.com/material-components/material-components-ios/pull/4478 to generate the correct stanza for us instead.
This was an automated change generated by running a find-and-replace regular expression:
### Find
```
/\*
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\.
\*/
```
### Replace
```
// 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.
```
The issue is that our internal client was setting numberOfLines to 0 on both title and detail labels in the MDCCollectionViewTextCell, which resulted in there being more than 3 lines of text, which the cell currently cannot handle. When the number of visible lines isn't equal to 1, 2, or 3, it just doesn't update the Y origins of the labels. The change I'm suggesting will make it so that in scenarios where there are more than 3 lines of text the Y origins of these labels are updated. I am alerting the internal client that a change to their codebase _may_ be necessary as well.
Closes#4037
* Updated known shortlink destination URLs to use short links.
* Updated stray links in the CHANGELOG.md.
* Fixed FAB shortlink.
* Applied replacements to everything outside of components/.
Calling -[UIImageView sizeToFit] will resize the view to fit the image inside.
MDCCollectionViewTextCell currently assumes the image will be 40x40, but
doesn't handle images other than this size.
Currently, if the image is larger than 40x40, the -sizeToFit call on
the image view will cause the view to go outside the bounds of
MDCCollectionViewTextCell and overlap the text.
Fixes#2911.
Reviewers: I'd like to add unit tests for this, but I'm not sure how to run MDC tests.
Any suggestions?
* Use framework-style imports.
MDFInternationalization is built as a framework, so use the style
recommended to import from the framework (#import <...>).
MotionAnimator and MotionInterchange mixed the normal style import
and the framework style import; settle them on the framework style.
* Update MDCActivityIndicator.m
Re-order to match our style guide.
* Update MDCBottomNavigationBar.m
Re-order to match our style guide.
* Update MDCBottomNavigationItemView.m
Re-order to match style guide.
* Update MDCBottomAppBarView.m
* Update MDCButtonBar.m
* Update MDCAppBarButtonBarBuilder.m
* Update MDCAppBarButtonBarBuilder.m
* Update MDCCollectionViewCell.m
* Update MDCAlertController.m
* Update NavigationBarIconsExample.m
* Update MDCNavigationBar.m
* Update MDCItemBarCell.m
* Update MDCTextField.m
* Update MDCThumbTrack.m
MDCCollectionViewTextCell has a few #define maros that are named like
constants but expand into method invocations. Replacing these with
static inline functions.
References #1682
Collection cell accessory views set to "Disclosure Indicator" will now
use template mode and will utilize the tinting of the cell/collection
view.
Closes#1575
The `-setSelected:` method reassigns the selection icon image every time
a cell is dequeued/reused. Since most cells are unselected most of the
time, this results in a lot of unnecessary UIImage calls. Only updating
the selected/unselected image if the view exists (it won't until
initially changed to Editing Mode) and if the state has changed.
Closes#1708
MDCCollectionViewTextCell computes the frames of the two UILabel subviews to determine their size, then again to determine how many lines of text will be in the cell. Instead of computing the frames twice, the first computation will simply be reused.
Closes#1699
MDCCollectionViewTextCells will no longer trim their label widths to the
width of the rendered text and will extend to the width of the
contentWrapper. This allows textAlignment properties to be effective
for lines shorter than the contentWrapper width.
Closes#1632
* [Icons] Add icon method for use with imageNamed
Icon images are currently loaded manually from a path in a bundle and therefore bypass the internal UIImage caching mechanism. This change will add new methods that provide the icon images via the -imageNamed family of methods.
Closes#1637, #1606
Make the code base more portable by replacing some GNU extension code
with C99-compatible versions.
* Replace shortcut ?: operator with explicit middle (true) terms
* Remove pointer inequality checks in conditionals
* (Cleanup) Change to #include for <tgmath.h> based on style guide
Closes#846
* [Docs] Adds platform configuration for the doc site.
* [Docs] Adds path metadata for documentation site.
This field is used to determine where the file will appear in the
doc site.
* [Docs] Updates Material guideline links to latest URL.
material.google.com -> material.io/guidelines
* [Docs] Introduces a separate component index for the docsite.
* [Docs] Changes the directory used for site generation.
* [Docs] Moves documentation-site-only Markdown into its own directory.
* [Docs] Changes material.io links to use https.
* [Docs] Renames the howto and contributing docsite sections to docs.
* [Docs] Adds a navTitle field to the collection editing/styling pages.
* [Docs] Changes the FAQ heading to be one size bigger.
* [Docs] Changes the tutorial title.
* [Docs] Adds icons to three more components.
* [Docs] Introduces a root component directory called /catalog/.
* [Docs] Adds an icon to the AnimationTiming component.
* [Docs] Adds an icon for the typography component.
* [Docs] Reformats the docsite index.
* [CollectionCells] Add accessibility hint in edit mode
When editing, selectable/deselectable cells now give an accessibility
hint: "Double tap to select.". This helps users to know what they can do
while in edit mode.
Related: https://github.com/material-components/material-components-ios/issues/1257
* Add tests
* [Collections] - Initial changes
* [Ink] - Updated MDCInkLayer to allow for multiple foreground and background ripples that stay referenced as opposed to one and one.
* [Ink] - Code cleanup, indentions, removed unused properties
* [Ink] - Line character counts
* [Ink] - More code cleanup, renaming, line spacing
* [Ink] - Updated docs
* [Ink] - Renamed methods
* [Ink] - Added state of cancelled for ink to prevent completion block calling
* [Ink] - Moved some api to private, updated completion blocks to incorporate weakSelf/strongSelf
* [Ink] - Removed testing and example code
* [Ink] - Additional demo code removed
* [Ink] - Broke retain cycle in ink
* [Ink] - Prevent over removal of ink layers caused by animation delegate being called on animation end AND removal
* [Ink] - Pulled completion block setting out if not needed
* [Ink] - Updated naming convention
* [Ink] - Addressing comments (possible crash on setting inkView to nil on collection cell, naming)
* [Ink] - Added easy out on setInkView method, styling for property declarations
* [Ink] - Renamed clearAllAnimations method to get in tandem with removeAllAnimations method on super class of CALayer
* [Ink] - Removed dependence on indexing for unedited ripples and rather using array count property
Moves call to layoutForegroundSubviews to follow call to
updateInterfaceForEditing to prevent the case where as the user
scrolls down in editing mode, the editing controls animate in and
cover parts of the content view.
BUG=988