<commit_before>// Copyright 2015-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.

#import <UIKit/UIKit.h>

@class MDCFlexibleHeaderView;
@protocol MDCFlexibleHeaderViewLayoutDelegate;
@protocol MDCFlexibleHeaderSafeAreaDelegate;

/**
 The MDCFlexibleHeaderViewController controller is a simple UIViewController-oriented interface
 for the flexible header view.

 Note that for this view controller, self.view == self.headerView. This is because this view
 controller is not meant to take up the full screen. Rather, it should be added as a child view
 controller within another view controller.

 ### UIScrollViewDelegate

 Instances of this view controller implement the UIScrollViewDelegate methods that must be
 forwarded to the flexible header view, so if you do not need to process the scroll view events
 yourself you can set the header view controller instance as your scroll view delegate.

 scrollView.delegate = headerViewController;
 */
@interface MDCFlexibleHeaderViewController
    : UIViewController <UIScrollViewDelegate, UITableViewDelegate>

/** The flexible header view instance that this controller manages. */
@property(nonatomic, strong, nonnull, readonly) MDCFlexibleHeaderView *headerView;

/**
 A Boolean value that governs whether the hairline is shown.

 The hairline is a narrow line shown at the bottom edge of the Flexible Header view.

 Defaults to NO.
 */
@property(nonatomic) BOOL showsHairline;

/**
 The color of the hairline.

 The hairline is a narrow line shown at the bottom edge of the Flexible Header view.

 Defaults to black.
 */
@property(nonatomic, strong, nonnull) UIColor *hairlineColor;

/**
 A block that is invoked when the @c MDCFlexibleHeaderViewController receives a call to @c
 traitCollectionDidChange:. The block is called after the call to the superclass.
 */
@property(nonatomic, copy, nullable) void (^traitCollectionDidChangeBlock)
    (MDCFlexibleHeaderViewController *_Nonnull flexibleHeaderViewController,
     UITraitCollection *_Nullable previousTraitCollection);

/** The layout delegate will be notified of any changes to the flexible header view's frame. */
@property(nonatomic, weak, nullable) id<MDCFlexibleHeaderViewLayoutDelegate> layoutDelegate;

/** The safe area delegate can be queried for the correct way to calculate safe areas. */
@property(nonatomic, weak, nullable) id<MDCFlexibleHeaderSafeAreaDelegate> safeAreaDelegate;

#pragma mark - Enabling top layout guide adjustment behavior

/**
 This runtime flag affects the way the top layout guide is modified.

 When disabled, the parent view controller is always assumed to be the topLayoutGuideViewController.
 This is considered the "legacy" behavior.

 When enabled, the topLayoutGuideViewController property will always determine which view
 controller's topLayoutGuide is adjusted. If topLayoutGuideViewController is nil and this property<commit_msg>[FlexibleHeader] Add synonyms to hairline API documentation for increased discovery.<commit_after>// Copyright 2015-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.

#import <UIKit/UIKit.h>

@class MDCFlexibleHeaderView;
@protocol MDCFlexibleHeaderViewLayoutDelegate;
@protocol MDCFlexibleHeaderSafeAreaDelegate;

/**
 The MDCFlexibleHeaderViewController controller is a simple UIViewController-oriented interface
 for the flexible header view.

 Note that for this view controller, self.view == self.headerView. This is because this view
 controller is not meant to take up the full screen. Rather, it should be added as a child view
 controller within another view controller.

 ### UIScrollViewDelegate

 Instances of this view controller implement the UIScrollViewDelegate methods that must be
 forwarded to the flexible header view, so if you do not need to process the scroll view events
 yourself you can set the header view controller instance as your scroll view delegate.

 scrollView.delegate = headerViewController;
 */
@interface MDCFlexibleHeaderViewController
    : UIViewController <UIScrollViewDelegate, UITableViewDelegate>

/** The flexible header view instance that this controller manages. */
@property(nonatomic, strong, nonnull, readonly) MDCFlexibleHeaderView *headerView;

/**
 A Boolean value that governs whether the hairline is shown.

 The hairline is a narrow line (i.e. a divider / dividing line) shown at the bottom edge of the
 Flexible Header view.

 Defaults to NO.
 */
@property(nonatomic) BOOL showsHairline;

/**
 The color of the hairline.

 The hairline is a narrow line (i.e. a divider / dividing line) shown at the bottom edge of the
 Flexible Header view.

 Defaults to black.
 */
@property(nonatomic, strong, nonnull) UIColor *hairlineColor;

/**
 A block that is invoked when the @c MDCFlexibleHeaderViewController receives a call to @c
 traitCollectionDidChange:. The block is called after the call to the superclass.
 */
@property(nonatomic, copy, nullable) void (^traitCollectionDidChangeBlock)
    (MDCFlexibleHeaderViewController *_Nonnull flexibleHeaderViewController,
     UITraitCollection *_Nullable previousTraitCollection);

/** The layout delegate will be notified of any changes to the flexible header view's frame. */
@property(nonatomic, weak, nullable) id<MDCFlexibleHeaderViewLayoutDelegate> layoutDelegate;

/** The safe area delegate can be queried for the correct way to calculate safe areas. */
@property(nonatomic, weak, nullable) id<MDCFlexibleHeaderSafeAreaDelegate> safeAreaDelegate;

#pragma mark - Enabling top layout guide adjustment behavior

/**
 This runtime flag affects the way the top layout guide is modified.

 When disabled, the parent view controller is always assumed to be the topLayoutGuideViewController.
 This is considered the "legacy" behavior.

 When enabled, the topLayoutGuideViewController property will always determine which view
 controller's topLayoutGuide is adjusted. If topLayoutGuideViewController is nil and this property
{'fraction_non_alphanumeric': 0.059640175662275106, 'fraction_numerical': 0.002266610001416631, 'mean_word_length': 4.858921161825726, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5216438', 'n_tokens_mistral': 1788, 'n_tokens_neox': 1669, 'n_words': 842}