Açıklama Yok

WMMenuItem.h 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // WMMenuItem.h
  3. // WMPageController
  4. //
  5. // Created by Mark on 15/4/26.
  6. // Copyright (c) 2015年 yq. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class WMMenuItem;
  10. typedef NS_ENUM(NSUInteger, WMMenuItemState) {
  11. WMMenuItemStateSelected,
  12. WMMenuItemStateNormal,
  13. };
  14. NS_ASSUME_NONNULL_BEGIN
  15. @protocol WMMenuItemDelegate <NSObject>
  16. @optional
  17. - (void)didPressedMenuItem:(WMMenuItem *)menuItem;
  18. @end
  19. @interface WMMenuItem : UILabel
  20. @property (nonatomic, assign) CGFloat rate; ///> 设置 rate, 并刷新标题状态 (0~1)
  21. @property (nonatomic, assign) CGFloat normalSize; ///> Normal状态的字体大小,默认大小为15
  22. @property (nonatomic, assign) CGFloat selectedSize; ///> Selected状态的字体大小,默认大小为18
  23. @property (nonatomic, strong) UIColor *normalColor; ///> Normal状态的字体颜色,默认为黑色 (可动画)
  24. @property (nonatomic, strong) UIColor *selectedColor; ///> Selected状态的字体颜色,默认为红色 (可动画)
  25. @property (nonatomic, assign) CGFloat speedFactor; ///> 进度条的速度因数,默认 15,越小越快, 必须大于0
  26. @property (nonatomic, nullable, weak) id<WMMenuItemDelegate> delegate;
  27. @property (nonatomic, assign, readonly) BOOL selected;
  28. - (void)setSelected:(BOOL)selected withAnimation:(BOOL)animation;
  29. @end
  30. NS_ASSUME_NONNULL_END