20 Commits

Author SHA1 Message Date
Randall Li
00611df7bd
[Buttons] Corrected imports in examples. (#2645)
* [Buttons] Corrected imports in examples.

PiperOrigin-RevId: 175377616

* added import UIKit
2017-12-08 11:40:03 -05:00
Martin Petrov
f98a9d42ed @objc annoaing catalog by convention (#2305) 2017-10-30 10:24:17 -04:00
Cody Weaver
1c7c9cd541 Update layout constraint to offset buttons by 20pt upwards, move catalog functions into extension (#2194) 2017-10-16 22:47:40 -04:00
Adrian Secord
f49aaa823c Change MDCButton to use MDCShadowElevation type instead of CGFloat. Fixes #2105. 2017-10-10 12:19:34 -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
Sam Morrison
4c84b99f2b [Buttons] Deprecate customTitleColor and remove auto-accessibility from setTitleColor (#1609)
* Prefer setTitleColor:forState over customTitleColor

* Mark customTitleColor as deprecated

* Replace customTitleColor implemention

* Replace doc-comment of customTitleColor

* Don't encode customTitleColor

* Remove outdated todo

* Remove outdated comment

* Replace more customTitleColor uses with setTitleColor:forState:

* Update button styles
2017-07-17 16:45:59 -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
Will Larche
f879c91a90 [Swift] Fixing swift style errors (#1577)
* [TextFields] Linting

* [Catalog] Swift style.

* [Catalog] Swift style.

* [Buttons] Swift style.

* [FlexibleHeader] Swift style.

* [NavBar] Swift style.

* [Snackbar] Swift style.

* [Tabs] Swift style.
2017-06-27 12:36:21 -04:00
Alastair Tse
4a46c8c19e Monochromatic sweep of all catalog components (#1370)
* Replace MDC all icons

* Update border

* Replace MDCActionExtension icon with new logo

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* WIP: Updating TabBar example to use black/green theme.

* WIP: Monochoroming all examples.

* Switch MDC Catalog to a black and white theme (#1355)

* Replace MDC all icons

* Update border

* Replace MDCActionExtension icon with new logo

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Fix floats

* Make Catalog greyscale to match Material’s style.

* More black and whiting

* WIP: Snackbar and global style

* Simplify snack bar examples.

* Page control
2017-05-05 16:16:47 -04:00
Adrian Secord
7ff646b58a [Swiftlint] Moar swiftlint fixes (#1155)
* Quieted swiftlint down in scripts/format_all.

* BONUS clang-format for ObjC code.

* Fixed two stray ObjC warnings (not swiftlint related).

* Fixed remaning swiftlint warnings.

* Fixed typos in Shrine fixes.

* Swift cleanups, again.

This reverts commit 7489fca4e4741ae02b406cdaacaf1dae26e19837.
2017-01-25 17:23:20 -05:00
Adrian Secord
7489fca4e4 Revert "Swift cleanups."
This reverts commit 129789c601a2bb6b09648af953c5433ebe3cebe0.
2017-01-25 16:58:40 -05:00
Adrian Secord
129789c601 Swift cleanups. 2017-01-25 16:56:24 -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
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
Junius Gunaratne
4596b7c861 [MDCFloatingButton] Floating action button should use a shape rather than text (#833)
* [MDCInkView] cancelAllAnimationsAnimated should support disabling animation

* [MDCProgressView] Allow completion block to be modified if setHidden:animated:completion is called sequentially

* Call completion block immediately rather than storing as a property.

* Add nil check for completion block

* [Shrine] Update to Swift 3

* [AppBar] Add Objective C AppBar storyboard example

* Add right button bar item to AppBar swift demo

* Add plus shape icon to FAB

* Move plus symbol to example code

* Add plus icon asset, move to supplemental

* Remove unused methods

* Undo change to print.

* Move plus CAShapeLayer code into its own method

* Remove plus path method

* Use supplemental method to get plus symbol CAShapeLayer
2016-11-16 13:31:59 -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
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
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
Junius Gunaratne
36ba8b0197 [Button demos] Add disabled button states to demos, change storyboard bg color
Reviewers: ajsecord, featherless, #mdc_ios_owners

Reviewed By: featherless, #mdc_ios_owners

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D428
2016-03-31 09:24:43 -04:00
Jeff Verkoeyen
85cd837a8b Adds a Swift sample for Buttons.
Summary:
This is a 1:1 port of the Objective-C sample for buttons. Proves that Catalog by Convention actually picks up samples written in Swift.

---
Closes https://github.com/google/material-components-ios/pull/142
GitHub author: peterfriese

!![[https://github.com/google/material-components-ios/pull/142 | This is a child of GitHub pull request #142]]!!.

Reviewers: github-bot, ajsecord, #mdc_ios_owners

Reviewed By: ajsecord, #mdc_ios_owners

Subscribers: ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D221
2016-03-08 15:04:07 -05:00