* [Collections] Update collections to support iPhone X
The collections use the contentInset to compute the width of the cells.
With iPhone X, the width must take into account possible inset of the side.
This patch makes sure that the collection takes into account the adjustedContentInset, which may take the safe area into consideration.
Closes#1980
* Correct respondsToSelect
* Use macro + @available instead of NSInvocation
* Fix CollectionCellsExamples and add a swift version check to the swift example.
* Make UIScrollViewContentInsetAdjustmentAlways the default
* Remove override from CollectionsSectionInsetsExample
All examples now have at least the required `+catalogBreadcrumbs` and `+catalogIsPrimaryDemo`. All examples in the same breadcrumbs path have only one primary demo. There should be only one `-catalogDescription` attached to the primary demo.
Closes#1897
When using the swipe-to-dimiss gesture on large screens, the distance on which the user has to move the item can be big. This commit limits the distance by using the width of the item instead of the width of the collection.
Closes#1780
* [Collections] Add "editing" performance example
New example to demonstrate scrolling performance when a collection
contains a large number of cells. "Editing" mode is currently very
inefficient.
* Refactoring, pulling some code into supplemental
* Making cell identifier symbol unique
* [Collections] Add StylingDelegate methods to control separator display
Adds methods to MDCCollectionViewStylingDelegate, allowing the delegate to control the display of the separator on cells, header and footer.
Closes#1406
* [Collections] Allow custom UIEdgeInsets
MDCCollectionViewController implements custom logic for computing the
`UIEdgeInsets` depending on the `MDCCollectionViewCellStyle` and the
`MDCCollectionViewCellLayoutType`. Subclasses need to override this
functionality to customize their presentation.
* MDCCollectionViewController will use the public
`-collectionView:layout:section` to compute the width of its
supplementary view instead of the internal implementation directly.
* Update the Collections layout example to have different horizontal
edge insets depending on the view's horizontal size class.
Closes#1507
* Add EarlGrey test to verify the insets exampl
* Removing changes to Collection Cells example
* Running code formatter
* Supplemental files.
* Some code clean-up based on willlarche@'s comments
* Removing old header, small cleanup
* Changing block parameter types to match the desired class
* One last id to remove
* Making Earl Grey test a bit better. Some formatting
* Fixing a bug with the flowLayout delegate
* [ReadMes] - Updated readme docs for collection views to include note about using section headers/footers while editing
* Updated docs
* [ReadMes] - Fixed code snippets
* [ReadMes] - Updated indention in code blocks
* [ReadMes] - Corrected indentions in code snippets
* [Collections] - Updated cell editing example
* [Collections] - Updated example spacing
* [Collections] Fixed return statement
* [Collections] - Updated example
* [Collections] - Added TODO comment with bug reference
* [Collections] - Added comment TODO comment to example code as well
* ClangFormat changes.
* Added swiftlint to scripts/format_all.`
* Fix scripts/lint_all to work from any directory.
* Fixed swiftlint invocation.
* Remove the checks for force casting (! operator).
* Some fixes.
* More Swift fixes.
* WIP
* WIP
* Simplified build script and fixed it to build all schemes.
* WIP
* Renamed script to build_all and added better output.
* Add scripts/list_xcode_workspaces.
* Filtered out the CocoaPods schemes.
* Use Xcode to update Swift to v3.
* Updated tracked touches map from NSNumber to Int.
* Fixed button sorting that was not actually sorting.
* targetContentOffset no longer allowed to be nil.
* "Fixed" failing test by reducing random number range?
* Swift 3 syntax change.
* Swift 3 syntax change.
* Removed invalid center-aligning tests.
Fixed default nav bar alignment test.
We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has...
Summary:
We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has no legal change, since the contributors always retained their copyright despite the copyright notice, but it's a nice acknowledgement.
Changed copyright statement to include non-Google authors.
Command run:
find * \( -name '*\.m' -or -name '*\.h' -or -name '*\.swift' \) -and -not \( -path 'scripts/external*' -name Pods \) -print0 | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'
Added non-source files.
Command run:
grep -Rl 'Copyright .* Google Inc' * --exclude-dir scripts/external --null | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'
Reviewers: featherless, O1 Material components iOS, randallli
Reviewed By: O1 Material components iOS, randallli
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D1415