MXNavigationBarManager.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // MXNavigationBarManager.h
  3. // MXBarManagerDemo
  4. //
  5. // Created by apple on 16/5/25.
  6. // Copyright © 2016年 desn. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. @interface MXNavigationBarManager : NSObject
  11. @property (nonatomic, strong) UIColor *barColor; //NavigationBar background color, default is white
  12. @property (nonatomic, strong) UIColor *tintColor; //NavigationBar subviews color
  13. @property (nonatomic, strong) UIImage *backgroundImage; //default is nil
  14. @property (nonatomic, assign) UIStatusBarStyle statusBarStyle; // default is UIStatusBarStyleDefault
  15. @property (nonatomic, assign) float zeroAlphaOffset;//color will changed begin this offset, default is -64
  16. @property (nonatomic, assign) float fullAlphaOffset;//color alpha will be 1 in this offset, default is 200
  17. @property (nonatomic, assign) float minAlphaValue;//bar minAlpha, default is 0
  18. @property (nonatomic, assign) float maxAlphaValue;//bar maxAlpha, default is 1
  19. @property (nonatomic, strong) UIColor *fullAlphaTintColor;//if you set this property, the tintColor will changed in fullAlphaOffset
  20. @property (nonatomic, assign) UIStatusBarStyle fullAlphaBarStyle;//if you set this property, the barStyle will changed in fullAlphaOffset
  21. @property (nonatomic, assign) BOOL allChange;//if allchange = yes, the tintColor will changed with the barColor change, default is yes, if you only want to change barColor, set allChange = NO
  22. @property (nonatomic, assign) BOOL reversal;//this will cause that if currentAlpha = 0.3,it will be 1 - 0.3 = 0.7
  23. @property (nonatomic, assign) BOOL continues;//when continues = YES, bar color will changed whenever you scroll, if you set continues = NO,it only be changed in the fullAlphaOffset
  24. + (void)setBarColor:(UIColor *)color;
  25. + (void)setTintColor:(UIColor *)color;
  26. + (void)setBackgroundImage:(UIImage *)image;
  27. + (void)setStatusBarStyle:(UIStatusBarStyle)style;
  28. + (void)setZeroAlphaOffset:(float)offset;
  29. + (void)setFullAlphaOffset:(float)offset;
  30. + (void)setMaxAlphaValue:(float)value;
  31. + (void)setMinAlphaValue:(float)value;
  32. + (void)setFullAlphaTintColor:(UIColor *)color;
  33. + (void)setFullAlphaBarStyle:(UIStatusBarStyle)style;
  34. + (void)setAllChange:(BOOL)allChange;
  35. + (void)setReversal:(BOOL)reversal;
  36. + (void)setContinues:(BOOL)continues;
  37. + (void)managerWithController:(UIViewController *)viewController;//you should use this method to init MXNavigationManager
  38. + (void)changeAlphaWithCurrentOffset:(CGFloat)currentOffset;// implemention this method in @selectot(scrollView: scrollViewDidScroll)
  39. + (void)reStoreToSystemNavigationBar; //change the navigationBar to system style
  40. @end