UINavigationController+KSNavigationBar.h 924 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // UINavigationController+KSNavigationBar.h
  3. // TeacherDaya
  4. //
  5. // Created by Kyle on 2020/6/28.
  6. // Copyright © 2020 DayaMusic. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface UINavigationController (KSNavigationBar)
  11. /// A view controller is able to control navigation bar's appearance by itself,
  12. /// rather than a global way, checking "ks_prefersNavigationBarHidden" property.
  13. /// Default to YES, disable it if you don't want so.
  14. @property (nonatomic, assign) BOOL ks_viewControllerBasedNavigationBarAppearanceEnabled;
  15. @end
  16. @interface UIViewController (KSHanderNavigationBar)
  17. /// Indicate this view controller prefers its navigation bar hidden or not,
  18. /// checked when view controller based navigation bar's appearance is enabled.
  19. /// Default to NO, bars are more likely to show.
  20. @property (nonatomic, assign) BOOL ks_prefersNavigationBarHidden;
  21. @end
  22. NS_ASSUME_NONNULL_END