105 Commits

Author SHA1 Message Date
ianegordon
2a38d42711
[Dialogs] Rounded corner example (#2881)
* [Dialogs] Rounded corner example

* FB
2018-01-31 15:53:02 -05:00
danblakemore
dea8e3c7f4 [Dialogs] Added Example for issue #2860 to Dragons (#2864)
* [Dialogs] Added Example for issue #2860 to Dragons

Added an example to the dialogs examples which shows a dialog from a presented
view controller. Upon dismissal, the content of the view controller (designed to
obviously demark its bounds) shifts due to #2860.

* Changing the dialog content to better illuminate why this example exists.

* Added more informative titles

The presented view controller how has a title which further illustrates the
bounds change since the navigation bar's content shifts too. Also updated the
catalog description.

* Update copyright dates to help kokoro.

Copyright files only during a time range in which they actually existed.
2018-01-26 06:43:33 -08:00
Adrian Secord
267685b31a Revert "[Dialogs] Explicitly annotate MDCAlertController as not subclassable (#2801)"
Multiple internal breakages from fairly innocuous-looking subclasses.

This reverts commit d70ebaa194591c68e9fb7e4d755b93f56aabe703.
2018-01-08 10:28:28 -05:00
ianegordon
49de50edae Consolidate installation requirements in the main README (#2809) 2018-01-05 13:50:38 -05:00
ianegordon
d70ebaa194
[Dialogs] Explicitly annotate MDCAlertController as not subclassable (#2801)
* [Dialogs] Explicitly annotate MDCAlertController as not subclassable

* Remove outdated subclassing test
2018-01-04 16:49:54 -05:00
Yarden Eitan
6df22d2cd6
Update MaterialComponents podspec to separate extensions from component. Breaking change, please see description when sending out a new release (#2748)
* [Catalog] Update catalog readme to reflect podspec filename change

* upate podspec

* update spec to extension

* more specific dependency

* added documentation
2018-01-02 16:51:58 -05:00
Robert Moore
ae955a3af0 [Dialogs] Add designated initializer to MDCAlertController (#2778)
* [Dialogs] Add designated initializer to MDCAlertController

If MDCAlertController does not override the superclasses designated
initializers, then its own designated initializer may never get called.
This can lead to problems.  Although the superclass designated
initializers are unavailable in MDCAlertController, they must still have
implementations.

Closes #2775

* Revert to original initialization.

* Add implementation for `-init` that calls the internal initializer

* Adding subclass test

* Removing keys intended for encoding
2018-01-02 13:58:42 -05:00
Robert Moore
e03186525d
[Examples/Tests] Convert @imports to imports (#2761)
In order to make the internal build systems happier, @import statements should not be used.
2017-12-22 12:30:25 -05:00
Randall Li
c7f9946ee3 [Dialogs] Fixed retain cycle in MDCDialogTransition that causes MDCAlertController to never be released and presenting view to never be released. (#2684)
PiperOrigin-RevId: 178677625
2017-12-15 15:55:16 -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
a0915f5183 [Dialogs] Add BUILD file and test (#2647)
* [Dialogs] Add BUILD file and test

Adding a single no-op unit test to ensure that Kokoro is actually compiling
the target and that the target settings are correct.

* Fixing test name

* Removing unused package

* Fixing copyright
2017-12-08 15:05:47 -05:00
Randall Li
b1ec22207f
Fixed float conversion build errors (#2602)
* Fixed float conversion build errors
Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

Found by turning on warnings via: https://github.com/material-components/material-components-ios/pull/2480

* More Fixed float conversion build errors
Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

Found by turning on warnings via: https://github.com/material-components/material-components-ios/pull/2480
2017-12-06 15:57:04 -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
Jeff Verkoeyen
9f274b8ff1 Merge branch 'release-candidate' 2017-12-04 08:48:14 -05:00
Yarden Eitan
f9e187feb4 [Cleanup] remove checks for iOS8 and above as we now only support iOS8+ (#2555) 2017-12-02 22:08:00 -05:00
Junius Gunaratne
7dc9470943 [Themers] Add nullability to themers (#2551)
* Add nullability to themers

* Wrap optional
2017-12-01 17:31:41 -05:00
Jeff Verkoeyen
24e5fcbe66 [Dialogs] Add a private/ prefix to a private header import. 2017-11-29 16:22:03 -05:00
ianegordon
fa22f6d39e
[Dialogs] Call actionHandlers after the alert has been dismissed (#2490) 2017-11-29 15:56:06 -05:00
featherless
211ca772ea
[Dialogs] Migrate to Material Motion. (#2481)
This change implements the Material Motion spec for the Dialogs component using the Motion Interchange, Animator, and Transitioning APIs.

Many of the existing APIs will be able to be deprecated or made private in the future, though there is considerable existing downstream client usage of many of these APIs so this will need to be done with some care.

The client migration path for this change will look something like this on average:

```objc
// Old API
_transitionController = [[MDCDialogTransitionController alloc] init];
self.transitioningDelegate = _transitionController;		
self.modalPresentationStyle = UIModalPresentationCustom;

// New API
self.mdm_transitionController.transition = [[MDCDialogTransition alloc] init];
```
2017-11-28 11:08: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
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
Will Larche
d9e0811a81 [Themer] Updating the protocol generic syntax. (#2440) 2017-11-16 07:59:18 -05:00
Martin Petrov
f98a9d42ed @objc annoaing catalog by convention (#2305) 2017-10-30 10:24:17 -04:00
ianegordon
53929d8594 [Dialogs] Set Dialog example button to open material.io (#2214)
* Change dialog sample to open URL

* Create a saparate view controller to open the external URL
2017-10-19 10:53:05 -04:00
ianegordon
5d0ff94673 [Dialogs] Respect safe area insets (#2165)
* [Dialogs] Respect safe area insets

* Use containerView, not presentingController.view

* Move inset and centering code
2017-10-13 12:25:08 -04:00
Adrian Secord
479f7b1141 Remove trailing whitespace everywhere. (#2168) 2017-10-13 11:33:35 -04:00
ianegordon
c3379250de [Dialogs] Migrate to MDFInternationalization (#2124)
* [Dialogs] Migrate to  MDFInternationalization

* Remove double quotes
2017-10-10 09:49:25 -04:00
Will Larche
96fb533554 [Catalog] Fixes improper use of Bundle and assets (#2118)
* [Catalog] Fixing bundle usage in some examples.

* [Examples] Correcting use of assets and bundles.

* [Examples] Formatting.
2017-10-08 15:04:48 -04:00
Robert Moore
a5e28488f9 [Dialogs] Size action buttons during layout (#2065)
Buttons were previously being sized during `viewDidLoad`, which caused
problems if UIAppearance caused changes to contentEdgeInsets. Instead,
the buttons should be sized before layout of the dialog's subviews.

Also fixing some examples that were incorrectly sizing buttons before
layout.

Closes #1943
2017-10-01 15:58:48 -07:00
ruizhao
bd55e33bee [Dialog] Fix alert controller, title and message take half screen even they are nil (#1931)
* [Dialog] Fix alert controller, title and message take half screen even they are nil

When actionScrollView's height exceed the container view's height. If the contentScrollView's height is very small or 0, we are leaving a huge white spaces for contentScrollView.

* Add an example demostrating the new action and body sizing

* Fix formatting, enable Dynamic Type
2017-09-08 12:01:46 -04:00
Robert Moore
7f4c4e18c5 [Bundles] Use explicit class in bundleForClass (#1942)
Using `[self class]` when loading a bundle can result in missed resources when
a method is called from a subclass.  To prevent these errors, components should
be explicit about which class is being used to load bundles.

References #1941 (Components)
2017-09-05 14:17:54 -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
5498005f65 [Catalog] Enabling all "unused" warnings (#1875)
Re-enabling warnings for unused parameters. Turning on every other
unused warning I could find.

Closes #1874
2017-08-29 17:57:41 -04:00
ianegordon
73b41562b0 [Dialogs] Fix typo in comment 2017-08-22 10:36:05 -04:00
Robert Moore
22d19b7ae6 [Dialogs] Fix example class warnings (#1850)
A couple of methods were defined in the main class interface but
implemented in the category. They should be defined in the category and
implemented there as well.
2017-08-19 05:41:24 -04:00
ianegordon
b8f8bfef9c Add Issue number. (#1727) 2017-08-02 13:50:26 -07: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
Sarah Read
1644939299 [Dialogs] MDCAlertController should announce 'alert' in VO (#1639)
* MDCAlertController should announce 'alert' in VO

* Fix typos
2017-07-13 12:00:02 -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
0abca36dbb [Docs] Replaced internal site references with public equivalents. (#1616)
* Replaced internal site references with public equivalents.

* Updated spec link to material.io.
2017-07-10 16:35:35 -04:00
ianegordon
87574e57e3 [KeyboardWatcher] iOS 8 simplification and cleanup (#1589) 2017-07-05 13:11:42 -04:00
Junius Gunaratne
695b2dc3ec [Themer] Support alert color themer in iOS 8 (#1569) 2017-06-26 13:10:56 -04:00
ianegordon
4e3c62ba2f [Dialogs] Add nullability annotation (#1544) 2017-06-21 15:58:52 -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
Junius Gunaratne
71d441a065 Component themers and usage example for catalog (#1443)
Adding color scheme component themers.
2017-05-30 17:28:03 -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
Randall Li
1c7ca93142 ![ColorThemer] Reorganize source to create separate targets for each color themer. (#1466)
* reorganize the color themer classes so that they are separate targets for each mutator.

* moved source files out of MaterialThemes.

* moved theme examples into their main component locations out of themer’s.

* renamed core subspec to 'Component'
2017-05-26 17:17:55 -04:00
ianegordon
eb9351d1c3 [Dialogs] Shorten transition duration (#1465) 2017-05-26 11:46:21 -04:00