60 Commits

Author SHA1 Message Date
Cody Weaver
a37d4a4f3a
[Tabs] Fix an example bug (#5106)
This changes adds a `MDCAppBarColorThemer` and `MDCAppBarTypographyThemer` to the example. Previously there was a bug where the app bar wasn't the same color as the tab bar this addresses that.

Related to #2408  

| Before | After |
| ------- | ------- |
|![simulator screen shot - iphone x - 2018-09-12 at 11 07 36](https://user-images.githubusercontent.com/7131294/45434318-23f10c80-b67c-11e8-8345-079a4a87b4c8.png)|![simulator screen shot - iphone x - 2018-09-12 at 10 53 44](https://user-images.githubusercontent.com/7131294/45434323-281d2a00-b67c-11e8-9aba-6d6c3734680c.png)|
2018-09-12 11:34:51 -04: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
Wenyu Zhang
4b00a6c745
[Tabs] fix TabBarViewControllerExample to respect safe area (#4949)
closes #3728 

### Before

![b1](https://user-images.githubusercontent.com/8836258/44799553-351d2200-ab82-11e8-9548-f0eb54cf2769.png)

### After:

![a1](https://user-images.githubusercontent.com/8836258/44799555-364e4f00-ab82-11e8-8aec-6b6316374f9b.png)
2018-08-30 15:26:46 -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
Wenyu Zhang
d60637ab71
[Tabs] Fix Tab Bar theming and background color issue (#4841)
This fixed two issues: (1) the status bar style color issue in tab bar view controller 
(2) the background color of the tab bar example was always black
2018-08-23 11:24:12 -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
featherless
50e1fd091d
[Catalog] Conversion to new App Bar View Controller API (#4696)
This PR updates the catalog to use the new MDCAppBar API throughout.
2018-08-07 09:30:37 -04:00
Robert Moore
cb08164a8d
[Tabs] Fix alerts in examples (#4480)
Several of the Tabs examples were using UIAlertControllers to present
multi-select options. Due to missing sourceView/sourceRect in the
popoverPresentationController, they would crash on iPads.  On iPhones,
they were shown as an action sheet and so did not require a source view.

## Sample screenshots
![simulator screen shot - ipad air 2 - 2018-07-06 at 14 14 28](https://user-images.githubusercontent.com/1753199/42394115-f90fd03a-8126-11e8-8471-b2d71e4b8b65.png)
![alignment-ipadair2-11 0 1](https://user-images.githubusercontent.com/1753199/42394116-f91d328e-8126-11e8-9a20-95e794145203.png)


Closes #3103
2018-07-06 14:37:26 -04:00
John Detloff
0c0ce4248e
Initialize default color and typography schemes in examples (#4200)
Ensure a default colorScheme and typographyScheme is initialized for examples.
2018-05-21 12:44:43 -04:00
Robert Moore
957f3fa127 [Tabs] "Add" button shows when needed (#3739)
* [Tabs] "Add" button shows when needed

The Tabs Icon example has an "Add" button in the App Bar that adds a star to
one of the two views. The Add button should only be visible if that view is
visible.

Pivotal: https://www.pivotaltracker.com/story/show/157298200

* Formatting

https://github.com/material-components/material-components-ios/pull/3739
2018-05-04 16:04:02 -04:00
featherless
e923d2d928
[Catalog] Make many examples be dragons. (#3642)
Pivotal story: https://www.pivotaltracker.com/story/show/156939988
Pivotal story: https://www.pivotaltracker.com/story/show/156804299
Pivotal story: https://www.pivotaltracker.com/story/show/156939962
Pivotal story: https://www.pivotaltracker.com/story/show/156982119
Closes: https://github.com/material-components/material-components-ios/issues/3183
2018-05-02 08:31:55 -04:00
featherless
08403aecf7
[Tabs] Add umbrella headers for all extension targets. (#3476)
Also updated all imports to make use of the umbrella headers.

Pivotal story: https://www.pivotaltracker.com/story/show/157045283
2018-04-26 21:20:08 -04:00
featherless
6ef9939111
[Tabs] Replace MDCRaisedButton with contained button themer in TabBarIndicatorTemplateExample. (#3500)
Pivotal story: https://www.pivotaltracker.com/story/show/157105832

Before:
![simulator screen shot - iphone se - 2018-04-25 at 20 14 16](https://user-images.githubusercontent.com/45670/39279219-a8eb18b0-48c5-11e8-8c51-dea08ac819d5.png)

After:
![simulator screen shot - iphone se - 2018-04-25 at 20 15 57](https://user-images.githubusercontent.com/45670/39279225-ac8c4200-48c5-11e8-8475-42db5c2a76ba.png)
2018-04-26 21:18:31 -04:00
featherless
32138a9118
[Tabs] Replace MDCRaisedButton with contained button themer. (#3497)
Pivotal story: https://www.pivotaltracker.com/story/show/157102119

## Screenshots

### Before

![simulator screen shot - iphone se - 2018-04-25 at 16 53 31](https://user-images.githubusercontent.com/45670/39272389-c6b33dbc-48a9-11e8-9c40-3647ab52fefa.png)
![simulator screen shot - iphone se - 2018-04-25 at 16 53 29](https://user-images.githubusercontent.com/45670/39272390-c6c051dc-48a9-11e8-8dc2-fcb6fe390b0e.png)

### After

![simulator screen shot - iphone se - 2018-04-25 at 16 54 42](https://user-images.githubusercontent.com/45670/39272403-cc8551a8-48a9-11e8-829b-9f82bfc6c455.png)
![simulator screen shot - iphone se - 2018-04-25 at 16 54 41](https://user-images.githubusercontent.com/45670/39272404-cc937774-48a9-11e8-9633-ec4a6fbab646.png)
2018-04-26 12:54:18 -04:00
featherless
a5c816e823
[Tabs] Replace MDCRaisedButton with contained button themer in TabBarIconExample. (#3499)
Pivotal story: https://www.pivotaltracker.com/story/show/157102565
Pivotal story: https://www.pivotaltracker.com/story/show/157102482

Before:
![simulator screen shot - iphone se - 2018-04-25 at 17 07 13](https://user-images.githubusercontent.com/45670/39277305-20f082c4-48bb-11e8-8a39-0f3d8f2e55a7.png)

After:
![simulator screen shot - iphone se - 2018-04-25 at 17 06 22](https://user-images.githubusercontent.com/45670/39277310-25e5b948-48bb-11e8-8914-af88737e5f77.png)
2018-04-26 12:53:32 -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
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
featherless
23110ef116
[Catalog] Make all swift copycat demos be dragons. (#3443)
Also removed "(Swift)" from any examples that remained as non-dragons. The catalog does not need to advertise which language a given demo is in.

Pivotal story: https://www.pivotaltracker.com/story/show/156939611

## Screenshots

Before:
![simulator screen shot - iphone se - 2018-04-23 at 14 04 14](https://user-images.githubusercontent.com/45670/39144588-36095450-46ff-11e8-868d-bdb7e8ee5438.png)

After:
![simulator screen shot - iphone se - 2018-04-23 at 13 53 39](https://user-images.githubusercontent.com/45670/39144567-2ad7bf9a-46ff-11e8-9fd5-ef0739d427b3.png)
2018-04-24 15:52:13 -04:00
John Detloff
f082d88099
[TabBars] Add titleColorForState and imageTintColorForState (#3396)
Deprecates selectedItemTintColor and unselectedItemTintColor and adds titleColorForState: and imageTintColorForState:, allowing clients to set the color for the title text and image tint separately.

https://www.pivotaltracker.com/story/show/156742602

Before:
![screen shot 2018-04-18 at 4 54 49 pm](https://user-images.githubusercontent.com/1418389/38957808-859f08cc-4329-11e8-9e70-d0e2436636cd.png)
![screen shot 2018-04-18 at 4 54 45 pm](https://user-images.githubusercontent.com/1418389/38957809-85aae5e8-4329-11e8-9eb0-2bde634335ed.png)
![screen shot 2018-04-18 at 4 54 40 pm](https://user-images.githubusercontent.com/1418389/38957810-85b30002-4329-11e8-957f-5cc3ef745e29.png)
![screen shot 2018-04-18 at 4 54 36 pm](https://user-images.githubusercontent.com/1418389/38957811-85bb3ace-4329-11e8-8f4a-7a6ab94074b5.png)
![screen shot 2018-04-18 at 4 54 31 pm](https://user-images.githubusercontent.com/1418389/38957812-85c35d4e-4329-11e8-9c32-22b7cf46d2be.png)
![screen shot 2018-04-18 at 4 54 26 pm](https://user-images.githubusercontent.com/1418389/38957813-85ccaad4-4329-11e8-9c3b-38b87fa15b59.png)
![screen shot 2018-04-18 at 4 54 20 pm](https://user-images.githubusercontent.com/1418389/38957814-85d78b7a-4329-11e8-8a8d-76ee9669dad4.png)
![screen shot 2018-04-18 at 4 54 15 pm](https://user-images.githubusercontent.com/1418389/38957815-85e3a05e-4329-11e8-836b-c1629e28105d.png)

After:
![screen shot 2018-04-18 at 4 48 27 pm](https://user-images.githubusercontent.com/1418389/38957825-8cdc401e-4329-11e8-981d-014441d3793a.png)
![screen shot 2018-04-18 at 4 48 18 pm](https://user-images.githubusercontent.com/1418389/38957826-8ce5e2e0-4329-11e8-9155-27522c002481.png)
![screen shot 2018-04-18 at 4 48 07 pm](https://user-images.githubusercontent.com/1418389/38957827-8cf233a6-4329-11e8-9dc1-e1704f2eaee5.png)
![screen shot 2018-04-18 at 4 48 00 pm](https://user-images.githubusercontent.com/1418389/38957828-8cfda2c2-4329-11e8-9c6f-479d339e9478.png)
![screen shot 2018-04-18 at 4 47 54 pm](https://user-images.githubusercontent.com/1418389/38957829-8d092eda-4329-11e8-8365-11c1160d9f2c.png)
![screen shot 2018-04-18 at 4 47 45 pm](https://user-images.githubusercontent.com/1418389/38957830-8d13e082-4329-11e8-85a0-d391e9b379cb.png)
![screen shot 2018-04-18 at 4 47 40 pm](https://user-images.githubusercontent.com/1418389/38957831-8d216324-4329-11e8-91e4-6ea7afa3bb9b.png)
![screen shot 2018-04-18 at 4 47 25 pm](https://user-images.githubusercontent.com/1418389/38957832-8d2ceeec-4329-11e8-9080-e7047b517312.png)
2018-04-20 13:39:37 -04:00
John Detloff
7799a15025
Update MDCTabBar color themer (#3361)
https://www.pivotaltracker.com/story/show/156171753


Before:
https://user-images.githubusercontent.com/1418389/38756680-56e300aa-3f38-11e8-8ab3-c4cae293c689.png
https://user-images.githubusercontent.com/1418389/38756681-574887e0-3f38-11e8-99bf-e4993d093a8a.png
https://user-images.githubusercontent.com/1418389/38756682-575790aa-3f38-11e8-858e-a44fe1312875.png
https://user-images.githubusercontent.com/1418389/38756683-576b5b94-3f38-11e8-9cb6-3f0b7bf49b55.png
https://user-images.githubusercontent.com/1418389/38756684-577a85ce-3f38-11e8-96f7-2b5d6a600ff8.png
https://user-images.githubusercontent.com/1418389/38756685-57854748-3f38-11e8-9fb9-2ba5c7c9142b.png
https://user-images.githubusercontent.com/1418389/38756686-57902276-3f38-11e8-91a6-d34bf054553f.png
https://user-images.githubusercontent.com/1418389/38756687-579e0684-3f38-11e8-9f3a-7b335aa0b9c7.png

After:
https://user-images.githubusercontent.com/1418389/38756708-6825c8c0-3f38-11e8-9f00-bc5a871cc26b.png
https://user-images.githubusercontent.com/1418389/38756709-68338faa-3f38-11e8-89c5-588cba6711f6.png
https://user-images.githubusercontent.com/1418389/38756710-68443d46-3f38-11e8-8894-8d11096e0650.png
https://user-images.githubusercontent.com/1418389/38756711-68502836-3f38-11e8-8cba-2f492c25042a.png
https://user-images.githubusercontent.com/1418389/38756713-685fa5d6-3f38-11e8-868a-5481e1a8d5f1.png
https://user-images.githubusercontent.com/1418389/38756714-686a62b4-3f38-11e8-8a36-b4fd948ea00b.png
https://user-images.githubusercontent.com/1418389/38756715-6875927e-3f38-11e8-9a9a-5371514156a5.png
https://user-images.githubusercontent.com/1418389/38756716-68817f26-3f38-11e8-8d2b-162dda9a6780.png
2018-04-17 14:23:36 -04:00
Mohammad Cazi
207e59d1b1
[Tabs] Implementing TabBar Typography Themer. (#3278)
* Implementing TabBar Typography Themer.

* add typographyScheme to a tabbar example.

* couple of nits.
2018-04-09 12:51:58 -04: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
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -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
Brian Moore
8463e9b46b [Tabs] Allow customization of fonts and text transform (#2547)
* [Tabs] API additions to customize more properties

* [Tabs] Update name of padding property

* [Tabs] Add bar padding property

* [Tabs] Use text attributes instead of font

* [Tabs] Use enum to define text transform

* [Tabs] Remove IBInspectable for UI_APPEARANCE_SELECTOR properties

* [Tabs] Switch back to UIFont

* [Tabs] Update API, implement font properties

* [Tabs] Implement text transform

* [Tabs] Update comments for unimplemented properties

* [Tabs] Remove unimplemented properties for now

* [Tabs] Small iteration

* [Tabs] Update displaysUppercaseTitles comment

* [Tabs] Use property accessors, consolidate uppercase logic

* [Tabs] Explicitly number MDCTabBarTextTransform

* [Tabs] Review fixes

* [Tabs] Slightly more concise
2017-12-03 16:37:54 -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
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
Brian Moore
e558394e6e
[Tabs] Selection indicator templates (#2384)
* [Tabs] Selection template prototyping hacks

* [Tabs] More API refinement within prototype

* [Tabs] API revisions

* [Tabs] Bump copyright year for changed files

* [Tabs] API revisions

* [Tabs] Update prototype to work with newest API revisions

* [Tabs] Make concrete indicator context private

* [Tabs] Clean up prototype for real implementation

* [Tabs] More implementation cleanup

* [Tabs] Add selection indicator example code

* [Tabs] Document selection indicator templates

* [Tabs] Add missing files, update with latest CocoaPods

* [Tabs] Copyright year bump, make template null_resettable

* [Tabs] Miscellaneous small edits

* [Tabs] Last set of edits

* [Tabs] Actually add missing files

* [Tabs] Small edits

* [Tabs] Added appearance switch to indicator example + other edits

* [Tabs] Style fixes

* [Tabs] NSCoding for MDCTabBarIndicatorView

* [Tabs] Update availability check
2017-11-16 11:40:05 -05:00
Andrés
2d8a51e5d5
[Tabs] Internal fixes to account for the Safe Area insets. (#2261)
* [TabBar] Fixes for Safe Area insets.

* [TabBar] Check bar position.

* [TabBar] Add back intrinsicContentSize for consistency with sizeThatFits.

* [TabBar] RTL fixes

* [TabBar] Call setNeedsUpdateConstraints to match UIKit.

* [TabBar] Remove need for maintaining a height constraint for auto layout.

* [TabBar] Undo sizeThatFits/intrinsicContentSize changes.

* [TabBar] Revert more things.

* [TabBar] Undo more stuff.

* [TabBar] Review
2017-10-31 14:14:21 -04:00
Martin Petrov
f98a9d42ed @objc annoaing catalog by convention (#2305) 2017-10-30 10:24:17 -04:00
Andrés
cdfbaacec4 [Catalog] De-hardcode the status bar height from a couple of examples. (#2292)
* [Catalog] De-hardcode the status bar height from a couple of examples.

* [Catalog] Fix indentation.
2017-10-26 14:56:01 -04:00
Adrian Secord
479f7b1141 Remove trailing whitespace everywhere. (#2168) 2017-10-13 11:33:35 -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
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
Adrian Secord
fb32dccf2d Replace usage of new with alloc init to match the style guide. (#2033)
https://github.com/google/styleguide/blob/gh-pages/objcguide.md#avoid-new
2017-09-25 10:46:44 -04:00
Robert Moore
017f86f134 [Catalog] Fix Tabs example for rotation (#2019)
* [Catalog] Fix Tabs example for rotation

When the last tab was selected and the scroll view was all the way to
the right, rotating the device from portrait to landscape would cause
the scroll view to reposition itself. This resulted in half of each of
the two screens being visible.

* Marking size unused

* Fixing swift example. Unmarking "size" as unused
2017-09-21 18:55:40 -04:00
Cody Weaver
2b160e6a7c [Catalog] Update all Mono fonts to use system font (#1967)
* Update existing RobotoMono fonts to system Mono font

* Updates mono font's to check for iOS 9 or use a font descriptor

* Fix two remaining issues

* Updated PR to use function instead of macro, also reverted back to RobotoMono for CatalogTiles

* Reverted back to RobotoMono for CatalogTiles

* Update styling issues

* Update fonts to be 14 instead of 16pt

* Fix crash in Swift

* Update swift uses of UIFont.withSize(x)

* Update iOS9 check and fix errors with UIFont

* Remove function for check and use respondsToSelector

* Fix extra new lines

* Undo formatting changes.

* Undo whitespace changes.
2017-09-21 09:57:40 -04:00
Robert Moore
601789c8c9 [Catalog] Bottom Navigation example should use safeAreaInsets (#1976)
The Bottom Navigation example for Tabs was overlapping with the Home Screen
indicator on the iPhone X. The example will now use safeAreaInsets if available
to calculate the position of the tab bar.

Closes #1975
2017-09-14 09:45:15 -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
21b4e5028c [TabBar] Fix warnings and button color in example (#1849)
The TabBar Icon example had 2 warnings about unknown selectors because
they were defined in the class implementation but not exposed to the
category. The AppBar items were also unreadable because they were black
text on dark gray background colors.
2017-08-19 05:40:34 -04:00
Adrian Secord
206b0bf39b Added missing license stanzas. (#1768) 2017-08-10 17:16:33 -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
Brian Moore
00ee814539 [Tabs] Constrain tabs to the view's width (#1615) 2017-07-10 11:56:46 -04:00
Brian Moore
60db284cb2 [Tabs] Restore initial tab selection behavior (#1605)
* [Tabs] Select initial tab by default

* [Tabs] Update comments

* [Tabs] Formatting pass, updated examples to allow deselection

* [Tabs] Revise and simplify behavior

* [Tabs] Simplified by removing _lastSelectedIndexPath
2017-07-07 11:50:40 -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
Junius Gunaratne
2873e798f2 [Themes] Add ability to change catalog theme (#1477)
Discussed merge with Ian offline. Issues with Travis CI may be resolved once the PR is merged.

* Add color to tiles.

* Add theming to catalog

* Update text field tile.

* Implementation method signatures should match those in header.

* Update MDCDrawFunc typedef

* Pass color scheme through NSNotification

* Add component theming

* Add tabbar themer

* Update tab example to use UIAppearance

* Theme sliders based on UIAppearance proxy

* Allow any class conforming to MDCColorScheme

* Override navigation bar color theme for imagery example.

* Update AppBar and ButtonBar color theming

* Update button bar themer comment

* Update button theming

* Remove theme imports where not necessary.

* Fix case of private
2017-06-23 11:36:48 -04:00
ianegordon
f88dc55511 [Tabs] Add MDCTabViewController (#1482)
* MDCTabBarViewController - like UITabBarViewController, but uses Material Design's MDCTabBar

* MDCTabBarViewController Interface Builder example

It's integrated into the Catalog app as a Tab example. Also demonstrates moving the tab bar from the unselected state to the selected state. Note: this reveals a bug with the unselected state that https://github.com/material-components/material-components-ios/pull/1441 fixes.

* Copyright date is 2017 for these TabBarViewController files. Fix white space issues.

* Add <UITabBarItem *> to local variable in updateTabBarItems

* Address Brian Moore's comments: ran clang-format -style=file on these files,
Modified tabBar delegate protocol: tabBar:willSelectItem: becomes tabBar:shouldSelectItem:
so that MDCTabBarViewController can have a 'shouldSelect' delegate.

* comment correction of ViewController to view controller.

* Add new API to MDCItemBar in preparation for deprecating willSelect: from the delegate protocol, replacing it with shouldSelect:. Revert changes to comment lines that appear to be a mis-configuration at my end to 80 columns.

* Tested more thoroughly, verified that the class still works.

* Restore the delegate willSelect method that we intended in favor of shouldSelect:

* Simplify private/MDCItemBar's delegate protocol, write MDCTabBar public protocol in terms of it, as Brian asked.

* Comment fixes.

* Address Brian Moore's May 31 comments. Adjust color of TabBar in Interface builder example.

* Update README.md
2017-06-06 17:32:21 -04:00
Brian Moore
a680e30a56 [Tabs] Bottom navigation support (#1411)
* [Tabs] Bottom navigation support

* [Tabs] Formatting pass and slight edits

* [Tabs] Small updates based on code review
2017-05-31 11:19: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
Will Larche
653aec06e9 [Site] Catalog colors (#1377)
* [Site] New screenshots

* [Catalog] Example styling.

* [Documentation] Readme image widths.
2017-05-05 16:27:32 -04:00