| ### Recommended behavioral flags |
| |
| The flexible header component includes a variety of flags that affect the behavior of the |
| `MDCFlexibleHeaderViewController`. Many of these flags represent feature flags that we are using |
| to allow client teams to migrate from an old behavior to a new, usually less-buggy one. |
| |
| You are encouraged to set all of the behavioral flags immediately after creating an instance of the |
| flexible header. |
| |
| The minimal set of recommended flag values are: |
| |
| <!--<div class="material-code-render" markdown="1">--> |
| #### Swift |
| ```swift |
| // Enables support for iPad popovers and extensions. |
| // Automatically enables topLayoutGuideAdjustmentEnabled as well, but does not set a |
| // topLayoutGuideViewController. |
| flexibleHeaderViewController.inferTopSafeAreaInsetFromViewController = true |
| |
| // Enables support for iPhone X safe area insets. |
| flexibleHeaderViewController.headerView.minMaxHeightIncludesSafeArea = false |
| ``` |
| |
| #### Objective-C |
| |
| ```objc |
| // Enables support for iPad popovers and extensions. |
| // Automatically enables topLayoutGuideAdjustmentEnabled as well, but does not set a |
| // topLayoutGuideViewController. |
| flexibleHeaderViewController.inferTopSafeAreaInsetFromViewController = YES; |
| |
| // Enables support for iPhone X safe area insets. |
| flexibleHeaderViewController.headerView.minMaxHeightIncludesSafeArea = NO; |
| ``` |
| <!--</div>--> |