24 Commits

Author SHA1 Message Date
Wenyu Zhang
00a6cab90b [ProgressView] Remove setMode:animated:completion API.
PiperOrigin-RevId: 317304615
2020-06-19 07:35:03 -07:00
Wenyu Zhang
d5b47fca05 [ProgressView] Make indeterminate progress view example showing how transition looks.
PiperOrigin-RevId: 316958915
2020-06-17 13:58:19 -07:00
Nobody
1a75f9dbbb Add and indeterminate state to the progress bar.
PiperOrigin-RevId: 315687797
2020-06-10 07:43:47 -07:00
Wenyu Zhang
9c480c21a4 [ProgressView] Add support for gradient progress bar.
PiperOrigin-RevId: 310977753
2020-05-12 15:11:46 -04:00
Robert Moore
800188a649
{clang-format} Format the components. (#6347)
This is a follow-up to https://github.com/material-components/material-components-ios/pull/6027

```
find components \( -name "*.h" -or -name "*.m" \) | xargs clang-format -i
```
2019-01-23 11:08:43 -05:00
Robert Moore
372d6b24f9
No longer using -init for Color Scheme. (#5734)
{MDC iOS} No longer using `-init` for Color Scheme.

Based on the discussions in go/mdc-ios-theming, we should not use the `-init` default initializer. Instead, we should use an explicit set of defaults.

Search regex: '\[\[MDCSemanticColorScheme alloc\] init\]'
2018-11-12 12:54:47 -05:00
Robert Moore
03f3351ad5
Global replace of single-precision floats with CGFloat casts. (#5718)
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
2018-11-12 10:50:01 -05:00
Robert Moore
74a27253e8
Global replace of integral single-precision literals with integer literals. (#5709)
Global replace of integral single-precision literals with integer literals.

Regular expression used:
```perl
/[^\w]([0-9]+)\.[0]*[fF]/$1/
```
2018-11-08 14:02:04 -05:00
featherless
2181084272
[automated] Standardize our open source license stanza to what Xcode generates. (#4985)
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.
```
2018-08-31 12:13:07 -04:00
Andrew Overton
19372e3cde
[ProgressView] Address progress view example problems with safe area insets and impr… (#4895)
Addressing clipping of progress views on iPhone X as well as improper alignment on iOS 12.

Closes #4785 
Closes #3718

"Before" pic for both issues:
![image](https://user-images.githubusercontent.com/2329102/44110190-183a476e-9fcd-11e8-86ae-59e9de787e76.png)

"After" pics for both issues: 
![simulator screen shot - iphone x - 2018-08-24 at 16 19 50](https://user-images.githubusercontent.com/8020010/44606294-988e0500-a7ba-11e8-83d8-0444f3d95f38.png)
![simulator screen shot - iphone x - 2018-08-24 at 16 19 46](https://user-images.githubusercontent.com/8020010/44606295-988e0500-a7ba-11e8-9dda-2e131ec194d4.png)
2018-08-31 11:01:45 -04:00
Yarden Eitan
3480c50c67
updated to newest CbC standard (#4956)
Move to the new CbC standard released in CatalogByConvention v2.5.0. See PR: material-foundation/cocoapods-catalog-by-convention#27 for more info on the change.
2018-08-29 20:45:13 -04:00
Robert Moore
43b4f6dcd2
[ProgressView] Add 'animate' button to example. (#4863)
The ProgressView example had infinite animation loops. This causes problems
when working with Earl Grey, which tries to wait for the main loop to stop
executing animations before interacting. By adding a manual "Animate" button
we allow Earl Grey tests to execute and still allow users to see how a
ProgressView will act when placed on-screen.

|Before|After|
|--|--|
|![mdc-pv-before](https://user-images.githubusercontent.com/1753199/44406891-c1986680-a52a-11e8-8442-a3db7c287c36.gif)|![mdc-pv-button](https://user-images.githubusercontent.com/1753199/44406901-c52bed80-a52a-11e8-80d2-081e8b481eb5.gif)|

Closes #4835
2018-08-21 10:40:49 -04:00
Robert Moore
5a10eeef51
[ProgressView] Use schemes in example. (#4859)
The ProgressView example should be using the color and typography schemes from
the catalog.

|Before|After|
|--|--|
|![mdc-pv-before1](https://user-images.githubusercontent.com/1753199/44403212-d6bcc780-a521-11e8-9599-e632d422243b.png)|![mdc-pv-after3](https://user-images.githubusercontent.com/1753199/44403127-a117de80-a521-11e8-97d4-0e655450f6ad.png)|
2018-08-21 10:40:31 -04:00
Mohammad Cazi
5ee14ab92e
[Catalog] Component descriptions update. (#3490)
* Button Description updated.

* Updating the description of Catalog Components.

* Missing space.

* fixing couple of small issues with catalog descriptions.

https://github.com/material-components/material-components-ios/pull/3490
2018-04-25 16:06:18 -04:00
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -05:00
Randall Li
2f29f00d86 Fixed some compiler warnings (#2426)
* Added warnings to examples.

* fixed some warnings

* using button sender parameter.

* use button sender in example

* use button sender in example

* removed sender from methods that don’t use it.

* removed sender from methods that don’t use it.

* use button sender in example

* use button sender in example

* use button sender in example

* use button sender in example

* Fixed init of header configurator to use passed in parameter

* removed unused API

* use button sender in example

* Revert "Added warnings to examples."

This reverts commit 91f0480f86cb609c47b00f1346f82de67c31c4e9.

* fixed example: Using the view controllers navigationItem rather than creating a new one.

* removed finished checks from animation blocks in examples.

* reverted id sender checks

* revert id sender check for Flexible header UINavigationBar

* revert clug

* revert clug

* addressing nits

* removed sender check for FeatureHighlightTypicalUseView

* more nits
2017-11-22 10:51:55 -05: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
ec1feb81a5 [MDCPalette] Use class properties (#1470)
* Replacing methods with class properties.

* Updating docs to reflect new Swift call style.

* Updating examples.

* Updating ObjC examples to use dot syntax
2017-05-30 08:20:00 -04:00
Adrian Secord
c6620b9ada Ran scripts/format_all. (#1141) 2017-01-06 13:57:36 -05:00
Sam Symons
26ce625081 [ProgressView] Backward animation support (#1138)
* Add backward progress animation mode support.

This allows users to animate the progress view backward if they are giving it progress which is lesser than the current value.

* Demonstrate the backward progress animation support.

* Update the assets for the progress view.

* Change ProgressViewExample with new enum name.

* Updated enum names.

* Update with new enum names.
2017-01-05 18:09:18 -05:00
Adrian Secord
0b57f48e1d Removed all warnings from the build.
Reviewers: O1 Material components iOS, randallli

Reviewed By: O1 Material components iOS, randallli

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1633
2016-09-19 10:20:45 -04: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
6ce08f4c0f Source changes to fix Xcode 8 compilation. 2016-07-28 17:03:08 -04:00
Louis Romero
a806413bd6 [ProgressView] Add the ProgressView component.
Summary:
Adds a ProgressView component. It displays determinate progress linearly.

Note: the README.md and API has previously been reviewed. Feel free to leave comments, but you can also skip for this review and focus on the implementation.

Test Plan: - Open Catalog > Progress View and verify looks.

Reviewers: randallli, junius, iangordon, O1 Material components iOS, ajsecord

Reviewed By: O1 Material components iOS, ajsecord

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1103
2016-07-09 00:28:19 +02:00