XG_BarButton.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // XG_BarButton.h
  3. // MyApp
  4. //
  5. // Created by huxinguang on 2018/9/11.
  6. // Copyright © 2018年 huxinguang. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef NS_ENUM(NSInteger,XG_BarButtonType) {
  10. XG_BarButtonTypeBack,
  11. XG_BarButtonTypeImage,
  12. XG_BarButtonTypeText
  13. };
  14. @interface XG_BarButtonConfiguration : NSObject
  15. @property (nonatomic, copy)NSString *normalImageName;
  16. @property (nonatomic, copy)NSString *selectedImageName;
  17. @property (nonatomic, copy)NSString *highlightedImageName;
  18. @property (nonatomic, copy)NSString *titleString;
  19. @property (nonatomic, strong)UIFont *titleFont;
  20. @property (nonatomic, strong)UIColor *normalColor;
  21. @property (nonatomic, strong)UIColor *selectedColor;
  22. @property (nonatomic, strong)UIColor *disabledColor;
  23. @property (nonatomic, strong)UIColor *highlightedColor;
  24. @property (nonatomic, assign)XG_BarButtonType type;
  25. @end
  26. @interface XG_BarButton : UIButton
  27. @property (nonatomic, strong)XG_BarButtonConfiguration *configuration;
  28. - (instancetype)initWithConfiguration:(XG_BarButtonConfiguration *)config;
  29. @end