QBPopupMenuPagenatorView.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // QBPopupMenuPagenatorView.h
  3. // QBPopupMenu
  4. //
  5. // Created by Tanaka Katsuma on 2013/11/23.
  6. // Copyright (c) 2013年 Katsuma Tanaka. All rights reserved.
  7. //
  8. #import "QBPopupMenuItemView.h"
  9. typedef NS_ENUM(NSUInteger, QBPopupMenuPagenatorDirection) {
  10. QBPopupMenuPagenatorDirectionLeft,
  11. QBPopupMenuPagenatorDirectionRight
  12. };
  13. @interface QBPopupMenuPagenatorView : QBPopupMenuItemView
  14. @property (nonatomic, weak) id target;
  15. @property (nonatomic, assign) SEL action;
  16. /* Custom */
  17. @property (nonatomic, strong) NSString *accessibilityLabel;
  18. + (CGFloat)pagenatorWidth;
  19. /* Custom */
  20. + (instancetype)leftPagenatorViewWithTarget:(id)target action:(SEL)action accessibilityLabel:(NSString *)accessibilityLabel;
  21. + (instancetype)rightPagenatorViewWithTarget:(id)target action:(SEL)action accessibilityLabel:(NSString *)accessibilityLabel;
  22. - (instancetype)initWithArrowDirection:(QBPopupMenuPagenatorDirection)arrowDirection target:(id)target action:(SEL)action accessibilityLabel:(NSString *)accessibilityLabel;
  23. // NOTE: When subclassing this class, use these methods to customize the appearance.
  24. - (CGMutablePathRef)arrowPathInRect:(CGRect)rect direction:(QBPopupMenuPagenatorDirection)direction CF_RETURNS_RETAINED;
  25. - (void)drawArrowInRect:(CGRect)rect direction:(QBPopupMenuPagenatorDirection)direction highlighted:(BOOL)highlighted;
  26. @end