127 Commits

Author SHA1 Message Date
Yarden Eitan
654c6cfdd7 [NavigationBar] Deprecate typography themer APIs.
PiperOrigin-RevId: 333366922
2020-09-23 14:10:35 -07:00
Yarden Eitan
2294616a4d [NavigationBar] Deprecate color themer APIs.
PiperOrigin-RevId: 333366577
2020-09-23 14:01:52 -07:00
Jeff Verkoeyen
fbb1f20aa2 Internal change
PiperOrigin-RevId: 332151481
2020-09-16 21:01:21 -07:00
Jeff Verkoeyen
b380dc5897 [NavigationBar] Mark more apis as to-be-deprecated.
PiperOrigin-RevId: 318869458
2020-06-29 12:32:34 -07:00
Jeff Verkoeyen
23878968f4 [NavigationBar] Remove default insets for leading titles.
After this change, the default behavior for MDCNavigationBar's titleInsets property will be dynamic. In leading mode, the default insets will be 0,0,0,0, while in centered mode the title insets will continue to be 0,16,0,16. If the titleInsets property is explicitly set then the explicitly set value will be preferred indefinitely.

PiperOrigin-RevId: 301632853
2020-03-18 11:41:35 -07:00
Tony Lai
8a3118161c Problem: The title label does not resize in an edge case when the user enables bold text in settings->display & brightness and then opening the app if the title label was already on the screen.
Root cause: The title label's size is calculated with the text and currently it does not recalculate upon the app entering the foreground

Solution: Force MDCAppNavigationBar to layout subviews on app entering foreground
PiperOrigin-RevId: 301604933
2020-03-18 09:47:13 -07:00
Bryan Oltman
14febdb6a1
Delete unused MDCNavigationBar textAlignment property (#8411) 2019-09-09 16:42:36 -04:00
Cody Weaver
60c60f288c
[NavigationBar] Add MaterialElevation support. (#8115)
Adds conformance to MDCElevatable and MDCElevationOverriding to
MDCNavigationBar.

Closes #8016
2019-07-29 20:47:46 -07:00
Cody Weaver
3d9d2db94d
[NavigationBar] Add traitCollectionDidChange block. (#7918)
The navigation bar needs an API so clients can hook-in to trait collection changes. This additionally passes the navigation bar as a parameter so clients can modify the flexible header within the block.

Closes #7919
2019-07-15 12:43:00 -07:00
Yarden Eitan
3b4bc76524
[NavigationBar] Adds the Ripple behavior to NavigationBar. (#7602)
## Related links
* Bug: Closes #7379 
* Ripple: [Ripple](https://github.com/material-components/material-components-ios/tree/develop/components/Ripple)

## Introduction
This PR allows enabling the Ripple Behavior for [`MDCNavigationBar`](https://github.com/material-components/material-components-ios/tree/develop/components/NavigationBar) by way of `MDCButtonBar` by enabling the ripple behavior of the internal `MDCButton`s. This behavior is an opt in flag property added to MDCNavigationBar, `enableRippleBehavior`.  This improves the visual touch feedback for our users as MDCInkView didn't support our current motion guidelines. We are also marking any of the Ink APIs ToBeDeprecated as part of the [Deprecation Policy](cb6b8e9599/contributing/deprecation_policy.md (step-4-add-a-comment-to-the-api-indicating-that-it-will-be-deprecated)).

## Videos
| Before | After |
| - | - |
|![oldRipple](https://user-images.githubusercontent.com/4066863/59468585-707e9980-8e00-11e9-8eb4-f6709ea3af94.gif)|![newRipple](https://user-images.githubusercontent.com/4066863/59468588-72e0f380-8e00-11e9-992f-9fecc8383dd7.gif)|
2019-06-15 17:53:35 -04:00
featherless
f60a0b6a59
[NavigationBar] Add rectFor*Item APIs. (#7504)
These two new APIs make it possible to get the frame of the leading and trailing item views in a navigation bar. These APIs are primarily intended for use when needing to present popover or contextual elements that point to the views for individual navigation bar items.

Closes https://github.com/material-components/material-components-ios/issues/7248
2019-05-28 16:10:38 -04:00
featherless
aa62eeb107
[NavigationBar] Fix bug where titleView would disappear. (#7310)
Closes https://github.com/material-components/material-components-ios/issues/7207

Context
-------

UINavigationBar will attempt to steal a navigationItem's titleView property for its own use, even if the navigation bar is not visible. Our own MDCNavigationBar also wants to show the titleView instance but we can't stop UINavigationBar from stealing the titleView.

To protect against this behavior, MDCNavigationBar implements a "sandbag swap" of the titleView when it's assigned. UINavigationBar ends up stealing the sandbag away, while our MDCNavigationBar keeps an internal reference to the desired titleView.

Before this fix
---------------

The sandbag view would be swapped the first time titleView is assigned. If the same titleView was assigned to the navigationItem again, however, we would not swap it with a sandbag. The result is that navigationItem.titleView would be pointing at the actual view (not the sandbag) when UINavigationBar comes around to steal the titleView. The result is that the titleView would disappear from MDCNavigationBar.

After this fix
--------------

We now assign the sandbag view on every assignment, regardless of whether the view is the same or not.

I wrote a test to simulate the theft behavior of UINavigationBar. I verified that the test failed before this patch and that it passes after this patch. I also verified the original bug with the internal client's code and example.
2019-05-01 19:37:34 +03:00
featherless
593d57f23c
[NavigationBar] Annotate themer APIs with the recommended APIs. (#7228)
Part of https://github.com/material-components/material-components-ios/issues/7108
2019-04-22 20:02:09 +03: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
Cody Weaver
aa2d3908f5
[NavigationBar] Add inset property for title view (#6118)
### Context
Currently navigation bar has the horizontal padding of 16 on both sides as a constant. A client may meed to have a spacing of 8 on both sides, 24 on both sides or 20 on one side and 0 on the other. Currently the docs say "_The title view's width will equal the navigation bar's width minus any space consumed by the leading and trailing buttons._" - MDCTitleViewLayoutBehaviorFill but if the titleBehavior is set to this value then it fills the navigation bar's width _minus 32_ minus any space consumed by the leading and trailing buttons. 
### The problem
In MDCTitleViewLayoutBehaviorFill it doesn't _Fill_ the navigation bar and isn't customizable.
### The fix
Expose the UIEdgeInset value that is used to layout the titleView.
### Related bug
Closes #6133
2018-12-28 08:28:31 -08:00
featherless
32fe4e191a
[NavigationBar] Update layout when button bar sizes change. (#4992)
Prior to this change, changing the title of a button would often result in the button's label being clipped because the navigation bar was not updating its button bar frames when needed.

After this change, the navigation bar makes use of 471936b842e7473e51b5dc02df619a7e67a0c5b2 to react to changes in the intrinsic content size of the button bar.

## Before

| Before changing title | After changing title |
|:----------|:------------|
| ![simulator screen shot - iphone x - 2018-08-31 at 16 20 30](https://user-images.githubusercontent.com/45670/44934442-d51dab80-ad3a-11e8-9313-056e135de150.png) | ![simulator screen shot - iphone x - 2018-09-07 at 09 29 39](https://user-images.githubusercontent.com/45670/45221807-9d55bd00-b280-11e8-92c4-07e0bc409d64.png) |

## After

| Before changing title | After changing title |
|:----------|:------------|
| ![simulator screen shot - iphone x - 2018-08-31 at 16 20 30](https://user-images.githubusercontent.com/45670/44934442-d51dab80-ad3a-11e8-9313-056e135de150.png) | ![simulator screen shot - iphone x - 2018-08-31 at 16 20 32](https://user-images.githubusercontent.com/45670/44934447-d64ed880-ad3a-11e8-9c67-67e50995fce0.png) |

Closes https://github.com/material-components/material-components-ios/issues/1717
2018-09-10 16:17:23 -04:00
Robert Moore
ed819a8304
[NavigationBar] Tint leading, trailing button bars. (#5064)
To prepare for tinting the leading and trailing button bar items in the
Bottom App Bar, the MDCNavigationBar should support an API that allows
separate tint colors for the leading and trailing button bar items.

**Extreme Example**

<img width="374" alt="screen shot 2018-09-07 at 11 23 02 pm" src="https://user-images.githubusercontent.com/1753199/45249812-024afa80-b2f5-11e8-920b-c32dccd8d3a5.png">

Part of #3928
2018-09-08 23:24:02 -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
Jeff Verkoeyen
9854044c96 Revert "[automated] Standardize our open source license stanza to what Xcode generates. (#4982)"
This reverts commit b45bc2fdd4dfe12fc76751a45c9cf7b0d6c1261f.
2018-08-31 12:01:24 -04:00
featherless
b45bc2fdd4
[automated] Standardize our open source license stanza to what Xcode generates. (#4982)
Removes the need to copy-paste stanzas from other files anymore as we'll rely on https://github.com/material-components/material-components-ios/pull/4478 to generate the correct stanza for us instead.

This was an automated change generated by running a find-and-replace regular expression:

### Find

```
/\*
 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\.
 \*/
```

### Replace

```
// 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 11:49:00 -04:00
featherless
059cbfaebb
[NavigationBar] Add uppercasesButtonTitles API for modifying title casing behavior. (#4936)
This allows an owner of a navigation bar to configure the title casing behavior for both the leading and trailing button bars.

Closes https://github.com/material-components/material-components-ios/issues/2968
2018-08-29 10:22:05 -04:00
featherless
bbe4a23fe0
Remove all __IPHONE_11_0 checks now that we no longer support Xcode 8. (#4915)
We can now make use of @available throughout our codebase.

We support Xcode 9 and up, which includes the iOS 11 SDK. This means we can remove any guards for SDKs prior to iOS 11.

This was cleaned up by running a global find-and-replace with the following regular expression:

```
Find:#if defined\(__IPHONE_11_0\) && \(__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0\)\n(.+if \(@available\(iOS 11.0, \*\)\) \{(?:.|\n)*?)(?:#else(?:.|\n)*?)?\n#endif
Replace:$1
```

With some additional cleanup for stragglers that didn't match this pattern. Note that else clauses were intentionally dropped.

Closes https://github.com/material-components/material-components-ios/issues/4909
2018-08-28 09:57:30 -04:00
featherless
56e8c4fd27
[NavigationBar] Add a flag that makes it possible to set any font size. (#4879)
This new flag allows a client to remove the 20pt font size restriction on MDCNavigationBar. This restriction was somewhat arbitrary and could cause problems with accessibility for certain font families.

Prior to this change, any font set on MDCNavigationBar would be restricted to 20pt size.

After this change, if the allowAnyTitleFontSize property is enabled on an MDCNavigationBar instance, then the font will be used directly and no sizes will be enforced.

This is required to support internal needs to set a navigation bar title font size of 18.
2018-08-24 13:36:28 -04:00
Randall Li
555bc1938e Merge branch 'release-candidate' into develop 2018-08-23 12:59:14 -04:00
featherless
e89ece3bb8
[ButtonBar|NavigationBar] Remove custom iPad heights. (#4874)
Historically we had given navigation bars different heights on iPads. We no longer intent to make this distinction.

This change also fixes a bug related to this difference in behavior on iPads. The repro case for this bug is:

- Launch MDCDragons on an iPad Pro running 10.3.1.
- Open the App Bar typical use example.
- Scroll the content down somewhat.

Expected behavior: the navigation bar does not change its height or shift.
Actual behavior: the navigation bar shifts slightly as the scroll view is scrolled.

After this change, the navigation bar's height will always default to the same fixed height on all devices. This reflects the fact that Flexible Header's default minimumHeight and maximumHeight values are constant across all devices.

Closes https://github.com/material-components/material-components-ios/issues/4840
2018-08-23 09:48:10 -04:00
Randall Li
5df5229171 Revert "[NavigationBar] Remove restriction for 20pt fonts. (#4851)"
This reverts commit 2c3f97a98f20645d780aa1b3bccd78646f224059.
2018-08-22 12:45:25 -04:00
featherless
2c3f97a98f
[NavigationBar] Remove restriction for 20pt fonts. (#4851)
This restriction is somewhat arbitrary and could cause problems with accessibility for certain font families.

Prior to this change, any font set on MDCNavigationBar would be restricted to 20pt size.

After this change, the font will be used directly and no sizes will be enforced.

This is required to support internal needs to set a navigation bar title font size of 18.
2018-08-21 09:29:20 -04:00
featherless
e14b90e829
[schemes/Color] Formally mark all to-be-deprecated APIs as "ToBeDeprecated". (#4738)
This change further formalizes our pattern of annotating APIs that will be or are deprecated using class categories. Moving an API into such a category has the benefit of being picked up by the API diff toolchain and elevated into our release notes as a result.
2018-08-09 16:39:56 -04:00
Ali Rabbani
4438b441b2 Mainline the YES behaviour for useFlexibleTopBottomInsets, and remove the already deprecated API. (#4570)
Mainline the YES behavior for useFlexibleTopBottomInsets, and remove the already deprecated API.

Closes https://github.com/material-components/material-components-ios/issues/3924
2018-07-16 13:29:51 -04:00
featherless
de0d57e8e3
[NavigationBar] Remove NSCoding support. (#4560)
Closes https://github.com/material-components/material-components-ios/issues/3944
2018-07-16 08:33:49 -04:00
featherless
c7ee146de2
[NavigationBar] Add a titleViewLayoutBehavior API. (#4371)
This property allows a client to configure the title view layout behavior to be one of either "fill" or "center". The fill behavior is the default and existing behavior, which sets the title view's frame to fill the available navigation bar space. The center behavior will always attempt to center the title view within the navigation bar's bounds.

The center behavior is desired by teams in the simple cases of when they want their title view to be centered within the navigation bar as best as possible. This is also the default behavior of UINavigationBar.

Closes https://github.com/material-components/material-components-ios/issues/1650

### Screenshots

"Fill" behavior:

![simulator screen shot - iphone se - 2018-06-06 at 09 13 03](https://user-images.githubusercontent.com/45670/41040247-d71e762c-6969-11e8-8584-f86c0c6fe514.png)

"Center" behavior:

![simulator screen shot - iphone se - 2018-06-06 at 09 11 53](https://user-images.githubusercontent.com/45670/41040226-cb1bc244-6969-11e8-815b-145e2e40b98b.png)

"Center" behavior in RTL languages:

![simulator screen shot - iphone se - 2018-06-06 at 10 39 37](https://user-images.githubusercontent.com/45670/41045233-f9fc3948-6975-11e8-9e9d-48ca5ed7342c.png)
2018-06-06 13:32:57 -04:00
Ali Rabbani
b9086c94c4 [NavigationBar] Deprecate useFlexibleTopBottomInsets (#4358)
Deprecate useFlexibleTopBottomInsets and change the default behavior to YES.
2018-06-06 09:47:53 -04:00
featherless
0cc7e9860f
Standardizing API docs. (#3481)
This standardizes the themer API docs for every component.

Pivotal story: https://www.pivotaltracker.com/story/show/157066083
2018-04-26 22:25:57 -04:00
featherless
8395836c98
Remove all UIAppearance references from documentation. (#3480)
We do not intend to actively support UIAppearance any further. This change removes any references to supporting UIAppearance from our public documentation.

Pivotal story: https://www.pivotaltracker.com/story/show/157048342
2018-04-26 12:55:35 -04:00
featherless
e5679888fe
[NavigationBar] Add umbrella headers for all extension targets. (#3471)
Also updated all imports to make use of the umbrella headers.

Pivotal story: https://www.pivotaltracker.com/story/show/157045283
2018-04-24 15:57:24 -04:00
featherless
bd05a69c88
[NavigationBar] Fix the surface variation themer's text/icon colors to match spec. (#3416)
For the variant themer, text is supposed to be onSurface @ 87% opacity, while icons are onSurface @ 54% opacity.

Closes pivotal story: https://www.pivotaltracker.com/story/show/156934328
Closes pivotal story: https://www.pivotaltracker.com/story/show/156934114

Before:

![simulator screen shot - iphone se - 2018-04-19 at 21 04 58](https://user-images.githubusercontent.com/45670/39065696-aa4df430-44a0-11e8-897f-3bc71b8b4c7e.png)

After:

![simulator screen shot - iphone se - 2018-04-19 at 21 04 03](https://user-images.githubusercontent.com/45670/39065699-ad47ffaa-44a0-11e8-9a40-e2d2cb92f908.png)
2018-04-20 15:15:23 -04:00
featherless
8d3f54246e
[NavigationBar] Add a stateful buttons title color API. (#3415)
This API allows a client to customize the title color for buttons for a given control state.

Related to https://www.pivotaltracker.com/story/show/156934328

Screenshot shows a button with a custom normal and highlighted state. The button on the left is highlighted.

![simulator screen shot - iphone se - 2018-04-19 at 19 51 59](https://user-images.githubusercontent.com/45670/39024065-786db638-440c-11e8-97e8-f6bf3e6c2af7.png)
2018-04-20 13:41:13 -04:00
featherless
610d1ab58a
[NavigationBar] Add an API for customizing button fonts. (#3412)
Pivotal story: https://www.pivotaltracker.com/story/show/156769836
2018-04-19 19:55:21 -04:00
featherless
6b2de0f3a3
[NavigationBar] Add surface variant theme. (#3376)
![simulator screen shot - iphone 8 plus - 2018-04-16 at 20 40 39](https://user-images.githubusercontent.com/45670/38842189-9ed9c6a2-41b6-11e8-9149-08f945c673d2.png)

Pivotal story: https://www.pivotaltracker.com/story/show/156826560
2018-04-17 08:02:09 -04:00
featherless
d259ebed7d
[NavigationBar] Fix bug where system font traits would be lost. (#3360)
### Context

When setting a font on MDCNavigationBar, we force the font to have a size of 20.

### Prior to this change

We were enforcing the font size by using an older UIFont API - fontWithName:size:. This API does not preserve font descriptor attributes from the provided font, it only preserves the font name and size.

This was resulting in the loss of an important system font descriptor attribute, namely `NSCTFontUIFontDesignTrait` which was set to `NSCTFontUIFontDesignDefault`. This font attribute affects the kerning of fonts when displayed on screen.

### After this change

We are now using the iOS 7 API - fontWithDescriptor:size:. This API preserves all of the underlying font descriptor attributes.

The result of this change is an intentional visual change.

As part of this behavioral change, I've also updated the related unit tests to enforce this behavior in the future.

To see a visual depiction of the change in behavior, open the following two screenshots and flip between them:

Before this fix:
![lossy](https://user-images.githubusercontent.com/45670/38755649-8a172a22-3f34-11e8-9f53-15ca6789e351.png)

After this fix:
![notlossy](https://user-images.githubusercontent.com/45670/38755654-8d998fa0-3f34-11e8-8112-49e3d4b7d76e.png)

Visual delta:
![difference](https://user-images.githubusercontent.com/45670/38755656-91d02f5c-3f34-11e8-8032-36d3ffc8f52e.png)
2018-04-13 16:25:17 -04:00
Ali Rabbani
8af9e9fc81 [ButtonBar] Allow customizing the inkColor of the buttons (#3250)
Make inkColor for buttons in MDCButtonBar customizable. Also expose an API on MDCNavigationBar to allow using the custom inkColor in AppBar.

closes #1660
2018-04-13 09:05:22 -04:00
Ali Rabbani
992d581481 [NavigationBar] Allow flexible height/insets in MDCNavigationBar (#3305)
This is a roll-forward for #2974, with fixes for the internal issues. We now have an API, and only change the behavior when the API is used. That API should be mainlined when all clients adopt the new behavior.

[titleLabel with titleView with useFlexibleTopBottomInsets=YES](https://user-images.githubusercontent.com/2232489/38525318-c7890406-3c1f-11e8-81f3-b72afee2dd71.png)
[titleLabel with titleView with useFlexibleTopBottomInsets=YES](https://user-images.githubusercontent.com/2232489/38525320-c7a32570-3c1f-11e8-9e46-e232307a5a0a.png)


[titleLabel with titleView with useFlexibleTopBottomInsets=NO (current behavior)](https://user-images.githubusercontent.com/2232489/38525261-9bf7b2f6-3c1f-11e8-9942-048c139e6163.png)
[titleLabel with titleView with useFlexibleTopBottomInsets=NO (current behavior)](https://user-images.githubusercontent.com/2232489/38525286-b150692c-3c1f-11e8-94b3-167d75393870.png)

[titleView with useFlexibleTopBottomInsets=NO (current behavior)](https://user-images.githubusercontent.com/2232489/38525208-72545e4a-3c1f-11e8-8e5e-eb9b3457c8b3.png)
[titleView with useFlexibleTopBottomInsets=YES](https://user-images.githubusercontent.com/2232489/38525209-725f4012-3c1f-11e8-838d-f6872a760931.png)

Internal testing done in cl/192612758.

closes #2793
closes #253
2018-04-13 09:02:59 -04:00
Mohammad Cazi
8e83dcf343
[NavigationBar] typography implementation. (#3304)
* Navigation Bar Typography Themer implementation.
Tests and example added.

* fixing merge conflict mistake and tests.
2018-04-10 11:01:51 -04:00
Mohammad Cazi
bc3b4e871b
Forcing Font size now does save the right FontName for every case. (#3299)
* Forcing Font size now does save the right FontName for every case.

* typo.

* can't expose a private header.

* mdc_weight should not be used.

* tests are up and running.

* fixing the tests. no support for weight on iOS 8.

* Document why we switched to fontWithName:size.
2018-04-09 16:37:05 -04:00
featherless
38595c6509
[NavigationBar] Implement a semantic color scheme color themer API. (#3267)
Also added unit tests and updated a couple examples to make use of the new themer APIs.

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

[Delivers #156169509]

![simulator screen shot - iphone x - 2018-04-06 at 11 36 09](https://user-images.githubusercontent.com/45670/38430240-b810f8b4-398e-11e8-9583-e871a5e5542d.png)
2018-04-09 11:27:53 -04:00
Jeff Verkoeyen
18b937aa31 Merge branch 'hotfix-53.0.0' into develop 2018-04-06 16:38:32 -04:00
Robert Moore
a5c0c8603e
Revert "[AppBar] Make MDCNavigationBar and MDCButtonBar size dynamically (#2974)" (#3276)
Internal clients have broken layouts when using custom titleViews after this
change. Reverting as a hotfix until a migration path can be developed.

This reverts commit 7172657a7b1cd04839eadc10e9d66e895a71bee7.
2018-04-06 15:19:58 -04:00
featherless
8c8b8d0a7e
[NavigationBar] Add an API for customizing the title label's text color. (#3266)
Pivotal story: https://www.pivotaltracker.com/story/show/155525164

![simulator screen shot - iphone x - 2018-04-06 at 09 22 24](https://user-images.githubusercontent.com/45670/38423500-18ce7586-397c-11e8-9cdf-72ce1e2de7c8.png)
2018-04-06 11:03:04 -04:00
Robert Moore
aac78b8451
Restore "[AppBar] Make MDCNavigationBar and MDCButtonBar size dynamically (#2974)" (#3243)
It looks like the internal changes were already approved by the client
team in (cl/189537437) but the link was missing in the GitHub PR.
Restoring the work originally done by @AlimoRabbani.

This reverts commit 890340e0bae74918afcfbf6a45fcbb3bbedda173.
2018-04-05 09:21:14 -04:00
Robert Moore
890340e0ba
Revert "[AppBar] Make MDCNavigationBar and MDCButtonBar size dynamically (#2974)" (#3241)
An internal client has failing screenshot tests (iPad Air 2/iOS 10.2)
where the text has been shifted down as a result of this change. It's
not clear whether the new position is expected or a bug, so the change
is being reverted until the correct behavior (or fix) can be determined.

Reopens #2793
Reopens #253

This reverts commit 7172657a7b1cd04839eadc10e9d66e895a71bee7.
2018-04-05 08:53:28 -04:00