28 Commits

Author SHA1 Message Date
Andrew Overton
4c75e862d4
[TextFields] Don't use MDCTextFieldTypographyThemer (#9170)
Related to #9168
2019-12-09 10:13:34 -05:00
Wenyu Zhang
593cf1e621 Revert "[TextFields] Check if placeholder is hidden before verbalizing it in voice over. (#8804)"
This reverts commit f9c17caf1bffd8e4538ee2c587d780e55437243c.
2019-11-22 10:56:15 -05:00
Randall Li
f9c17caf1b
[TextFields] Check if placeholder is hidden before verbalizing it in voice over. (#8804)
[TextFields] Add check for placeholder before adding to the accessibility strings spoken by voice over.

Also added changed example to remove the floating label so that we can check that voice over correctly verbalizes only the visible text.

Before and After zip:
[BeforeAfterVideos.zip](https://github.com/material-components/material-components-ios/files/3843558/BeforeAfterVideos.zip)

QA=Notice that "state" is verbalized when it is not visible on screen in the after.
more info at #7513
2019-11-15 12:21:40 -05:00
featherless
19a35ce6ee
[TextFields] Resolve some swift warnings. (#7529)
Doing this as part of exploring the new features and functionality of Xcode 11.0 beta 1.
2019-06-03 23:27:23 -04:00
Yarden Eitan
efe61588a6
update (#7246)
We need to add @objc annotations to colorScheme and typographyScheme instances in our Swift examples, because we moved to Swift 4.2, the respondsToSelector won't find `setColorScheme:` and `setTypographyScheme:` setters otherwise.
2019-04-23 10:21:14 -04:00
Andrew Overton
c56d5d76d3
Add @objc annotations to get examples to show up in Dragons (#7168)
This is a follow up PR for #7166 adds @objc annotations to Swift catalogMetadata() methods, because the Swift 4 compiler no longer attempts to infer what methods should be visible to Objective-C. As a result of this change in the compiler, no Swift examples were showing up in Dragons after #7166. See this article: https://useyourloaf.com/blog/objc-warnings-upgrading-to-swift-4/ for additional context.
2019-04-17 21:35:43 -04:00
Andrew Overton
b38372192f
Update to Swift 4.2 (#7166)
This PR updates the Swift version to 4.2.

Partially resolves #6874.
2019-04-17 16:59:02 -04:00
Joe Aguilar
fc7f30d012 [Catalog] Completed audit of swift forced unwrapping in catalog (#6186)
This work closes #3984.

This change audits the rest of the catalog swift examples force unwrapping. I had begun this process with PR #6117.
2019-02-06 11:01:48 -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
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
175942d9e0
[Catalog] Fix Swift example imports (#4780)
Many of our Swift examples are either missing imports or are importing all of
MaterialComponents. Both of these will cause failures during internal builds.
2018-08-14 13:26:37 -04:00
Andrew Overton
6acde0b275
[TextFields] Add setHelperText:helperAccessibilityLabel (#4661)
* Add setHelperText:helperAccessibilityLabel

* Add nullability annotations

* Do not copy helperText param in -setHelperText:

* Update filled text field example
2018-08-02 09:42:36 -04:00
Robert Moore
8835a412a2
[TextFields] Support clear button tint color (#4449)
Adding support to change the clearButton's tintColor from the TextInputController. This allows more consistent theming across controllers.

Closes #4447 

## Filled

**Before**
![screen shot 2018-06-29 at 12 23 12 pm](https://user-images.githubusercontent.com/1753199/42103490-427a1e96-7b97-11e8-9410-9d20f5ff6d32.png)


**After**
![screen shot 2018-06-29 at 12 21 51 pm](https://user-images.githubusercontent.com/1753199/42103502-4b1d8c22-7b97-11e8-85be-3997d0e3dee4.png)


## Outlined

**Before**
![screen shot 2018-06-29 at 12 23 01 pm](https://user-images.githubusercontent.com/1753199/42103497-45b2fca4-7b97-11e8-82df-3a01bc3e8240.png)

**After**
![screen shot 2018-06-29 at 12 21 36 pm](https://user-images.githubusercontent.com/1753199/42103498-48b22010-7b97-11e8-8c8e-004cb35d3b6a.png)
2018-06-29 15:44:09 -04:00
Will Larche
1f10ae3e3e
[TextFields] Making leading and trailing view layout customizeable (#4434)
Closes the layout part of b/74174981

***Breaks screenshot tests.

Before:
![simulator screen shot - iphone x - 2018-06-24 at 17 39 27](https://user-images.githubusercontent.com/1271525/41823956-2742affe-77d6-11e8-9082-2ccb10071750.png)

After:
![simulator screen shot - iphone x - 2018-06-24 at 17 35 45](https://user-images.githubusercontent.com/1271525/41823875-13f44152-77d5-11e8-8ae8-f23840efe6e1.png)

Also corrects the x of the floating placeholder on a filled text field.
![simulator screen shot - iphone x - 2018-06-24 at 17 45 43](https://user-images.githubusercontent.com/1271525/41823974-7e8c5346-77d6-11e8-88ce-38f4adb32323.png)
2018-06-25 07:59:33 -07:00
Will Larche
d13077450f
[TextFields] Correcting copy mistake. (#4281) 2018-05-25 16:41:24 -04:00
Will Larche
6f740c8c62
[TextFields] Fix text area placeholder (#4274)
* [TextFields] Correcting misaligned text area floating placeholder.

* [TextField] Adding text area set text examples.
2018-05-25 09:38:47 -04:00
Yarden Eitan
7f7bc36202
[Catalog] Expose colorScheme + typographyScheme properties for all examples to use app wide theming (#3478)
Made colorScheme and typographyScheme properties in the class interfaces for all our examples.
Moved theming away from example inits and into viewDidLoad
Small update for slider example to allow it to grab the theming properly.
Related Pivotal: https://www.pivotaltracker.com/story/show/156616695
2018-04-25 15:15:17 -04:00
Yarden Eitan
8717640dbd [Textfields] Added Filled and Outlined themers (#3438)
[Textfields] Added Filled and Outlined themers (#3438)
2018-04-20 18:13:32 -04:00
Mohammad Cazi
0efdeb2a3f
[TextFields] Typography Themer implementation. (#3303)
* TextFields Typography Themer added.
Tests and example included.

* Removing extra checks, comment the reason behind checking pointsize

* fixing typo.
2018-04-10 15:41:32 -04:00
Mohammad Cazi
75c81a1659
[TextFields] Adding Color Themer. (#3255)
* Adding Color Themer for Textfields.

* We have to keep the old API around, and deprecated after releasing the new version.

* fixing indentions.

* Importing the needed headers instead of forward declaration, documenting the deprecation and suggested methods to use.

* Filled text field example is updated to style the textfield with the semantic color scheme.
TextFieldColorThemer should be able to theme any MDCTextInput.

* fixed couple of method name change updates.

* Adding Color Themer for Textfields.

* We have to keep the old API around, and deprecated after releasing the new version.

* fixing indentions.

* Importing the needed headers instead of forward declaration, documenting the deprecation and suggested methods to use.

* Filled text field example is updated to style the textfield with the semantic color scheme.
TextFieldColorThemer should be able to theme any MDCTextInput.

* fixed couple of method name change updates.

* Revert "fixed couple of method name change updates."

This reverts commit 9e0ef0f2eb08026e05b1f182aab6b4dc84fa766b.

* Revert "Revert "fixed couple of method name change updates.""

This reverts commit bda6b13ff979811bd1eccc6ef365dd273fed007b.

* fixing breaking tests.
2018-04-06 12:06:12 -04:00
Yarden Eitan
c88a059640
[Catalog] Remove unwanted warnings from build (#2794)
* fix warnings for .count in Swift strings and duplicate images in Asset folders, also give the Extension target all icons

* update project settings to recommended ones
2018-01-05 16:58:33 -05:00
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -05:00
Martin Petrov
f98a9d42ed @objc annoaing catalog by convention (#2305) 2017-10-30 10:24:17 -04:00
Will Larche
75cf565fea [TextFields] Fix text fields overlapping labels (#2163)
* [TextFields] Removes ambiguous layout.

* [TextFields] Better code organization and comment.

* [TextFields] Adding a filled in field to the examples.

* [TextFields] Correcting placeholder not rising when text is set programatically. Also better naming.

* [TextFields] Giving examples of each floating style a set .text.

* [TextFields] Adding placeholder float test.
2017-10-12 23:25:50 -04:00
Will Larche
5dae93c6c4 [TextFields] Adding .placeholderText to controllers (#2149)
* [TextFields] Adding .placeholderText to fix bugs and continue moving API to controller.

* [TextFields] PR feedback.

* [TextFields] Removes ambiguous layout.

* [TextFields] Better code organization and comment.
2017-10-12 09:16:07 -04:00
Will Larche
b438856be2 [TextFields] Examples bug and formatting (#2137)
* [TextFields] Formatting correction.

* [TextFields] Example bug.
2017-10-09 21:54:41 -04:00
Will Larche
90e79dd815 [TextFields] iOS 11 example bugs fixed (#2071)
* [TextFields] Example fix for iOS 11.

* [TextFields] iOS 11 bugs fixed.

* [TextFields] Formatting

* [TextFields] Xcode 8 support

* [TextFields] Example layout correction.

* [TextFields] Xcode and iOS safety code.

* [TextFields] typo corrections.

* [TextFields] Code for Xcode conditional.

* [TextFields] Xcode 8 support.

* [TextFields] Pleasing the static analyzer.

* [TextFields] Formatting improvement.

* [TextFields] Swift compiler conditional change and some formatting.

* [TextFields] Swift example notification changes.

* [TextFields] Safer notifcations code in Objc.

* [TextFields] Formatting
2017-10-02 20:30:17 -04:00
Will Larche
cde864f235 [TextFields] Renaming classes to match the MD spec (#2061)
* [TextFields] Renaming classes to match the spec.

* [TextFields] Renaming examples.
2017-09-27 22:10:47 -04:00