21 Commits

Author SHA1 Message Date
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -05:00
featherless
e38ac60ffd
[ShadowLayer] Add support for implicitly animating the shadow layer's elevation using MotionAnimator. (#2509) 2017-11-22 16:16:57 -05:00
Martin Petrov
f98a9d42ed @objc annoaing catalog by convention (#2305) 2017-10-30 10:24:17 -04:00
Martin Petrov
6639fb4f70 Update shadow examples (#2174) 2017-10-13 13:07:31 -04:00
Martin Petrov
49fd0a07ea [ShadowElevations] Update ShadowElevations to be extensible. (#2145)
* [Collections] Modernize Swift in styling readme.

* [ShadowElevations] Update ShadowElevations to be extensible.

This defines a custom macro to get the typed enum behavior rather than
defining a system macro to prevent it from adversily affecting clients.

Redundant NS_SWIFT_NAME macros are removed.

Usage is updated to omit the optional rawValue: argument. Docs are also
updated to reflect the change.

* minor fixes

* need an extra clause for xcode8

* updated for xcode8 backwards compat
2017-10-13 11:36:31 -04:00
Junius Gunaratne
a9b08ce452 [ShadowElevations] Improve Swift support for shadow elevations (#2116)
* Shadow elevation swift

* Improve shadow elevation swift support

* Add const. Update formatting.
2017-10-06 15:01:41 -04:00
Robert Moore
8940d77d6d [Catalog] Verify all examples provide CatalogByConvention methods (#1911)
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
2017-08-31 08:46:10 -04:00
Martin Petrov
1e14d41091 Explicitly annotating some known ObjC methods. (#1617)
This improves Swift4 compatibility, see:
https://help.apple.com/xcode/mac/current/#/deve838b19a1
2017-07-10 19:46:22 -04:00
Adrian Secord
8bcb19781c More SwiftLint fixes for unit tests and example apps. (#1154)
* 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.
2017-01-11 13:27:57 -05:00
Sam Symons
bb561ac257 [Scripts] SwiftLint integration (#1129)
* Integrate SwiftLint in the Catalog.

* Update the disabled SwiftLint rules.

* Reference a local swiftlint.yml symlink.

This prevents us from getting warnings about code style violations from the other demos.

* Fix SwiftLint violations in the Catalog and Components.

* Ignore the `third_party` directory when running the linter.

We should not have to deal with warnings in code we may not be able to fix easily.

* Integrate SwiftLint into Shrine.

Additionally, fix a number of warnings introduced.

* Run SwiftLint on Travis.

* Enable many of the previously disabled rules and correct them.

* Fix control statement violations from SwiftLint.
2017-01-06 16:37:23 -05:00
Adrian Secord
e93a16ca02 Capitalize "Material" in documentation (#1014)
* s/material design/Material Design/g

* s/material components/Material Components/g

* s/material\([ \t\n]\)/Material\1/g

* s/aterial design/aterial Design/g
2016-12-13 08:06:55 -05:00
Adrian Secord
4842a362f5 Convert component examples to Swift 3 (#1002)
* 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.
2016-12-12 09:55:36 -05:00
Adrian Secord
8c3af252be Adding AUTHORS and removing CONTRIBUTORS.txt.
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
2016-08-08 08:16:37 -07:00
Adrian Secord
65a05eed31 Lowercase "material design" in text.
Summary: "Material design" is not capitalized except when referring to the actual Material Design team at Google.

Reviewers: O1 Material components iOS, randallli

Reviewed By: O1 Material components iOS, randallli

Subscribers: randallli, featherless

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1306
2016-07-25 14:13:08 -04:00
Eric Li
25ea19e76a updated examples and readme to use new swift selector syntax
Summary:
Updated project to use new swift #selector syntax

Closes https://github.com/google/material-components-ios/issues/520.

Reviewers: featherless, O1 Material components iOS

Reviewed By: featherless, O1 Material components iOS

Subscribers: featherless

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D938
2016-06-06 15:43:37 -04:00
Jeff Verkoeyen
21d5cf1d04 Global find-and-replace of 'kMDC' with 'k'.
Summary: Closes https://github.com/google/material-components-ios/issues/435.

Reviewers: ajsecord, #mdc_ios_owners

Reviewed By: ajsecord, #mdc_ios_owners

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D759
2016-04-26 15:20:18 -04:00
Junius Gunaratne
b8dc78d58c [Catalog and Shadow] Group shadow elevations with shadow demos
Reviewers: featherless, ajsecord, #mdc_ios_owners, randallli

Reviewed By: #mdc_ios_owners, randallli

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D637
2016-04-19 09:26:33 -04:00
Junius Gunaratne
7bb181a150 [Catalog] Make catalogIsPrimaryDemo static method in demos
Reviewers: ajsecord, #mdc_ios_owners, featherless

Reviewed By: #mdc_ios_owners, featherless

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D611
2016-04-15 09:31:51 -04:00
Junius Gunaratne
0411613c71 [Catalog] Demo selection screen updated with description and primary demo
Summary: Screenshot http://codereview.cc/M13

Reviewers: featherless, jstriegel, ajsecord, #mdc_ios_owners

Reviewed By: jstriegel, ajsecord, #mdc_ios_owners

Subscribers: ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D514
2016-04-07 16:45:52 -04:00
Jeff Verkoeyen
61a895c5b1 [Catalog] Rename catalogHierarchy to catalogBreadcrumbs.
Reviewers: junius, #mdc_ios_owners

Reviewed By: junius, #mdc_ios_owners

Subscribers: junius

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D448
2016-04-01 12:40:17 -04:00
randallli
5a16612612 [MDCShadowLayer] Refactored example to be compatible with catalog by convention.
Summary: This is a swift example

Reviewers: featherless, #mdc_ios_owners, ajsecord

Reviewed By: #mdc_ios_owners, ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D220
2016-03-08 14:28:22 -05:00