82 Commits

Author SHA1 Message Date
Yarden Eitan
3fe2bff374
[Podspec] Fix podspec warnings when issuing a lint (#2811)
* added supressing of partial-availability and changed image bit depth to remove podspec warnings on linting

* added code check
2018-01-08 11:45:11 -05:00
ianegordon
49de50edae Consolidate installation requirements in the main README (#2809) 2018-01-05 13:50:38 -05:00
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -05:00
Robert Moore
847d3757f5
[CollectionCells] Add BUILD file (#2693)
Fixing incorrect import in a unit test as well
2017-12-13 08:51:14 -05:00
featherless
b9404ded10
Revert "Add compile time flag for import style (#2562)" (#2612)
This reverts commit 6791dc4993d3a0ffa11735eeeef0583102621d52.
2017-12-06 11:22:17 -05:00
Louis Romero
6791dc4993
Add compile time flag for import style (#2562)
Closes #2550
2017-12-04 10:06:31 -08:00
Junius Gunaratne
10047dfbc9 [Ink] Enable updated ink for collection views (#2546)
* Enable updated ink for collection views

* Set usesLegacyInkRipple in cell
2017-12-01 19:01:46 -05:00
Sylvain Defresne
c3615fa300 Use framework-style imports. (#2428)
* Use framework-style imports.

MDFInternationalization is built as a framework, so use the style
recommended to import from the framework (#import <...>).

MotionAnimator and MotionInterchange mixed the normal style import
and the framework style import; settle them on the framework style.

* Update MDCActivityIndicator.m

Re-order to match our style guide.

* Update MDCBottomNavigationBar.m

Re-order to match our style guide.

* Update MDCBottomNavigationItemView.m

Re-order to match style guide.

* Update MDCBottomAppBarView.m

* Update MDCButtonBar.m

* Update MDCAppBarButtonBarBuilder.m

* Update MDCAppBarButtonBarBuilder.m

* Update MDCCollectionViewCell.m

* Update MDCAlertController.m

* Update NavigationBarIconsExample.m

* Update MDCNavigationBar.m

* Update MDCItemBarCell.m

* Update MDCTextField.m

* Update MDCThumbTrack.m
2017-11-17 10:39:48 -05:00
Yurii Samsoniuk
2a96682230 Replace unnecessary imports with forward declarations (#2429)
* [Themes] Remove unnecessary imports.

* [TextFields] Remove unnecessary imports.

* [Typography] Do not use an umbrella header inside of a component.

* [Snackbar] Do not use self umbrella header.

* [ActivityIndicator] Do not use self umbrella header.

* [AppBar] Use umbrella headers.

* [AppBar] Remove self import header.

* [ButtonBar] Removed self umbrella header imports.

* [Buttons] Removed self umbrella header imports.

* [Collections] Update imports.

* [Dialogs] Moved import into an m file.

* [Collections] Fixed imports.

* [FeatureHighlight] Removed self umbrealla imports.

* [HeaderStackView] Reordered imports.

* [Ink] Replaced imports with forward declarations.

* [Slider] Replaced self umbrella import use.

* [Snackbar] Removed self umbrella header import.

* [Tabs] Changed math import. Replaced self umbrella header import.

* [Icons] Removed unnecessary imports.

* [Overlay] Replaced umbrella header import.

* [ShapeLibrary] Replace Shapes imports with an umbrella header.

* [Shapes] Replaced imports with forward declarations.

* [AppBar] Replace import with a forward declaration.

* [Examples] Updated imports.

* Fixed conflicting imports

* Added space between different import categories
2017-11-16 18:25:06 -05:00
Robert Moore
5b33ae0c0b
[Collections] Change image when accessoryType changes (#2354)
Clients were unable to change the image of a cell's accessory type without
reloading the entire cell in the collectionView.

Closes #2353
2017-11-06 12:08:27 -05:00
Yurii Samsoniuk
6f5fb72de0 [CollectionCells] Migrated to MDFi18n. (#2248)
* [CollectionCells] Migrated to MDFi18n.

* Swapped dependencies from MDCRTL to MDFi18n
2017-10-26 11:38:29 -04:00
Cody Weaver
a462a2ac4f [Mutliple components] Update components that use colors to use MDCPalette. (#2129)
* Update components that use colors to use MDCPalette.

* Update podspec to make palettes available to Collection Cell
2017-10-09 12:53:50 -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
Robert Moore
080cc37058 [Collections] Replacing macros with function calls (#1787)
A few colors were generated using macros, so they are now replaced with
actual method and function calls.

References #1682
2017-08-11 17:53:59 -04:00
Robert Moore
8b5aeec8e4 [Collections] Make cell font values functions (#1763)
MDCCollectionViewTextCell has a few #define maros that are named like
constants but expand into method invocations.  Replacing these with
static inline functions.

References #1682
2017-08-10 11:17:46 -04:00
Robert Moore
e12db0f2ea [Collections] Making Disclosure indicator tinted (#1745)
Collection cell accessory views set to "Disclosure Indicator" will now
use template mode and will utilize the tinting of the cell/collection
view.

Closes #1575
2017-08-07 15:09:11 -04:00
Robert Moore
44e7c7974b [Collections] Only change selected icon if needed (#1692)
The `-setSelected:` method reassigns the selection icon image every time
a cell is dequeued/reused. Since most cells are unselected most of the
time, this results in a lot of unnecessary UIImage calls.  Only updating
the selected/unselected image if the view exists (it won't until
initially changed to Editing Mode) and if the state has changed.

Closes #1708
2017-07-31 09:18:15 -04:00
ianegordon
c1ce8bcca1 [Collections] Reuse label frames (#1705)
MDCCollectionViewTextCell computes the frames of the two UILabel subviews to determine their size, then again to determine how many lines of text will be in the cell. Instead of computing the frames twice, the first computation will simply be reused.

Closes #1699
2017-07-27 08:58:08 -04:00
Robert Moore
6785e7a0d3 [Collections] Extend cell label to superview width (#1661)
MDCCollectionViewTextCells will no longer trim their label widths to the
width of the rendered text and will extend to the width of the
contentWrapper.  This allows textAlignment properties to be effective
for lines shorter than the contentWrapper width.

Closes #1632
2017-07-21 13:57:47 -04:00
Robert Moore
565ae15cdb [Collections] Use image cache for selection icons (#1638)
* [Icons] Add icon method for use with imageNamed

Icon images are currently loaded manually from a path in a bundle and therefore bypass the internal UIImage caching mechanism. This change will add new methods that provide the icon images via the -imageNamed family of methods.

Closes #1637, #1606
2017-07-14 16:50:39 -04:00
Sam Morrison
31b3b623c3 Replace XCTest module import with header import 2017-07-13 18:45:22 -04:00
Robert Moore
25b7c217ca [CollectionCells] Reset cells in prepareForReuse (#1633)
MDCCollectionViewTextCell now resets all documented text label
properties in `-prepareForReuse`.

Closes #1631
2017-07-12 12:54:57 -04:00
Robert Moore
fa10d655d7 Remove uses of typeof and the ?: operator (#1601)
Make the code base more portable by replacing some GNU extension code
with C99-compatible versions.

* Replace shortcut ?: operator with explicit middle (true) terms
* Remove pointer inequality checks in conditionals
* (Cleanup) Change to #include for <tgmath.h> based on style guide

Closes #846
2017-07-11 17:39:45 -04:00
Adrian Secord
4dba0dfff8 Add -Wstrict-prototypes and fix errors. (#1532) 2017-06-19 17:33:37 -04:00
Randall Li
266a716f60 Fix imports to use umbrella imports (#1529)
* [ColorThemes] Use umbrella header instead of MDCColorScheme

* [Application] Use umbrella header instead of class header

* [Button] use umbrella header in private header

* [Typography] use umbrella header in private header

* icons using umbrella header in individual icon class

* [Icons] added header to umbrella header

* [collection] umbrella header instead of class header in test

* [Collections] use umbrella header in private header

* [ActivityIndicator] use umbrella header in private header

* [ButtonBar] use umbrella header in private header

* [Dialog] use umbrella header in private header

* [featurehighlight] use umbrella header in private header

* [snackbar] use umbrella header in private header

* [textFields] use umbrella header in private header

* [thumbtrack] use umbrella header in private header

* [Overlay] use umbrella header in private header

also removed spurious ’s’ at end of MaterialOverlay.h file

* [slider] use umbrella header in private header

* [buttonBar] use umbrella header in private header

* [slider] use umbrella header in test

* [Overlay] fixed overlay reference to use umbrella header
2017-06-19 15:57:48 -04:00
Scott Hyndman
eed028eacb [Docs] Adds API documentation roots and tidies up here and there. (#1425)
* [Docs] Marks component files as API documentation roots.

Used by the site generator to determine where to build API docs. I
marked everything built by the previous version.

* [Docs] Adds a prefix to all Material guidelines links.

* [Docs] Adds API doc links to some components.
2017-05-12 16:03:56 -04:00
Scott Hyndman
1571a1b9ee [Docs] Nests components in the navigation as spec'd. (#1404)
Also took the opportunity to remove an unneeded liquid style
application.
2017-05-09 11:49:44 -04:00
Adrian Secord
fd3bca4040 [CollectionCells] Added new screenshot for CollectionCells. (#1381) 2017-05-05 16:47:41 -04:00
Scott Hyndman
4a011e75a5 [Docs] Docstravaganza (#1330)
* [Docs] Adds platform configuration for the doc site.

* [Docs] Adds path metadata for documentation site.

This field is used to determine where the file will appear in the
doc site.

* [Docs] Updates Material guideline links to latest URL.

material.google.com -> material.io/guidelines

* [Docs] Introduces a separate component index for the docsite.

* [Docs] Changes the directory used for site generation.

* [Docs] Moves documentation-site-only Markdown into its own directory.

* [Docs] Changes material.io links to use https.

* [Docs] Renames the howto and contributing docsite sections to docs.

* [Docs] Adds a navTitle field to the collection editing/styling pages.

* [Docs] Changes the FAQ heading to be one size bigger.

* [Docs] Changes the tutorial title.

* [Docs] Adds icons to three more components.

* [Docs] Introduces a root component directory called /catalog/.

* [Docs] Adds an icon to the AnimationTiming component.

* [Docs] Adds an icon for the typography component.

* [Docs] Reformats the docsite index.
2017-05-01 17:27:38 -04:00
Will Larche
ff5d165869 [Math] New private math component (#1325)
* [Math] New private component.

* [Math] Putting MaterialMath everywhere it could help.
2017-04-17 16:14:17 -04:00
Scott Hyndman
0913aa9aaf [Docs]: Updated link list classes. (#1320)
Link lists now use BEM notation across the board. It's more verbose, but is
aligned with the conventions of MDC-web and the docs site.
2017-04-13 17:25:23 -04:00
Scott Hyndman
69533578ca [docs] Associated icons with components (#1315)
* Adds icon IDs to most component READMEs.

The ones without icon IDs will default to a generic icon.

* Removes a space from front matter.
2017-04-12 18:22:08 -04:00
Scott Hyndman
9ed1d4349d Gigantic documentation update. (#1305)
There are more changes to come, but it's time we merged back.

Changes:
* Re-introduces the doc site scripts and files that had been deleted previously.
* Updates contributing docs to reflect doc structure changes.
* Applies common header structure across all component documentation.
* Fixes a bunch of liquid syntax bugs.
* Inlines Front Matter metadata in README.md files as HTML comments. Any file prefixed with

  <!--docs:
  ...yaml
  -->

  Will be converted into Front Matter when generating the site.
* .jekyll_prefix files, which previously stored the data, have been removed.
2017-04-05 10:53:34 -04:00
Will Larche
8c5350de31 [All] Formatting. (#1269) 2017-03-22 12:18:15 -04:00
Louis Romero
4cbdfb9e31 [CollectionCells] Add accessibility hint in edit mode (#1258)
* [CollectionCells] Add accessibility hint in edit mode

When editing, selectable/deselectable cells now give an accessibility
hint: "Double tap to select.". This helps users to know what they can do
while in edit mode.

Related: https://github.com/material-components/material-components-ios/issues/1257

* Add tests
2017-03-21 10:54:13 -04:00
Justin Shephard
5db1b8add5 [Ink] - Fix memory leak in Ink and correct issues with ink when re-using cells (#1180)
* [Collections] - Initial changes

* [Ink] - Updated MDCInkLayer to allow for multiple foreground and background ripples that stay referenced as opposed to one and one.

* [Ink] - Code cleanup, indentions, removed unused properties

* [Ink] - Line character counts

* [Ink] - More code cleanup, renaming, line spacing

* [Ink] - Updated docs

* [Ink] - Renamed methods

* [Ink] - Added state of cancelled for ink to prevent completion block calling

* [Ink] - Moved some api to private, updated completion blocks to incorporate weakSelf/strongSelf

* [Ink] - Removed testing and example code

* [Ink] - Additional demo code removed

* [Ink] - Broke retain cycle in ink

* [Ink] - Prevent over removal of ink layers caused by animation delegate being called on animation end AND removal

* [Ink] - Pulled completion block setting out if not needed

* [Ink] - Updated naming convention

* [Ink] - Addressing comments (possible crash on setting inkView to nil on collection cell, naming)

* [Ink] - Added easy out on setInkView method, styling for property declarations

* [Ink] - Renamed clearAllAnimations method to get in tandem with removeAllAnimations method on super class of CALayer

* [Ink] - Removed dependence on indexing for unedited ripples and rather using array count property
2017-02-13 13:29:59 -05:00
Adrian Secord
7ba66bf09c Formatted all Objective-C sources with clang-format. (#1133) 2017-01-05 10:17:24 -05:00
Justin Shephard
c0103fc323 [ReadMes] - Updated asset name for collection_cells (#1111) 2016-12-27 14:43:19 -05:00
Justin Shephard
7a19483569 [ReadMes] - First image of each component is too big (#1110)
* MDC_#917 - Activity Indicator Readme Update

* MDC_#917 - Updated remaining readme image links

* MDC_#917 - Fixed typo
2016-12-27 14:16:55 -05:00
Adrian Secord
e8c45d5394 Removed old refs to API docs. (#1084)
* Removed old refs to API docs.

* Removed outdated refs to API docs.
2016-12-15 15:35:13 -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
8bc7a849ca Remove struct hacks (#992)
* Remove CGRect struct hacks.

* Fixed typo.
2016-12-09 15:59:50 -05:00
Jackie Quinn
27c514f4b8 [CollectionCells] Layout subviews after updating interface for editing (#989)
Moves call to layoutForegroundSubviews to follow call to
updateInterfaceForEditing to prevent the case where as the user
scrolls down in editing mode, the editing controls animate in and
cover parts of the content view.

BUG=988
2016-12-09 07:34:52 -05:00
Jackie Quinn
3730aa2c58 Add "selected" accessibility trait when cell is selected in edit mode (#967)
Adds UIAccessibilityTraitSelected when cell is selected and removes
it when cell is deselected.
2016-12-07 15:21:11 -05:00
Will Larche
5ca7c0bcf8 [Readme] Removing dead link in components. 2016-11-30 13:32:06 -05:00
Adrian Secord
171e5bfbc5 Remove MDCSwitch examples and catalog usage. (#892)
* Remove MDCSwitch examples and catalog usage.

* Restored deletion of Switch examples.

* Revert "Restored deletion of Switch examples."

This reverts commit efe9fc75ae3310b58fbb4b56c31caedb7a109bf9.

* No, really. Restore Switch examples.

* Removed all Podfile references.
2016-11-28 14:38:32 -05:00
Adrian Secord
2997e50c4c Updated refs to GitHub repo with new location. (#885)
* Updated refs to GitHub repo with new location.

* Reverted chagnes to JSON files.
2016-11-22 14:32:50 -05:00
Louis Romero
bb78cbb9d4 Set checked cell's accessibility trait to Selected
Summary:
When the accessory type is Checkmark, the accessibility trait Selected
is added.

This closes
https://github.com/google/material-components-ios/issues/840.

Reviewers: cjcox, ajsecord, O1 Material components iOS

Reviewed By: ajsecord, O1 Material components iOS

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1883
2016-11-16 11:09:29 +01:00
Gauthier Ambard
ba36035d48 Add color property for editing selector in MDCCollectionViewCell (#844)
This commit adds a property for the color of the editing selector.

This closes #842
2016-11-15 09:37:20 -08:00
Louis Romero
c6f6fb8546 [CollectionCells] Handle separator insets correctly in RTL
Summary:
Old behavior in RTL:
https://cloud.githubusercontent.com/assets/197492/20139244/6f29e752-a685-11e6-804a-f016f1029532.png

New behavior in RTL:
https://cloud.githubusercontent.com/assets/197492/20143972/57ad8988-a69b-11e6-9817-9a6d40d120d2.png

This closes https://github.com/google/material-components-ios/issues/845

Test Plan:
Open Catalog in RTL language (or pseudo-language).
Collections > Cell Separator Example
=> Check that Section 0 has a separator on the left and Section 1 has a
separator on the right.

Reviewers: cjcox, O1 Material components iOS, ajsecord

Reviewed By: O1 Material components iOS, ajsecord

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1894
2016-11-09 17:47:33 +01:00