REMenuItem.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //
  2. // REMenuItem.h
  3. // REMenu
  4. //
  5. // Copyright (c) 2013 Roman Efimov (https://github.com/romaonthego)
  6. //
  7. // Permission is hereby granted, free of charge, to any person obtaining a copy
  8. // of this software and associated documentation files (the "Software"), to deal
  9. // in the Software without restriction, including without limitation the rights
  10. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. // copies of the Software, and to permit persons to whom the Software is
  12. // furnished to do so, subject to the following conditions:
  13. //
  14. // The above copyright notice and this permission notice shall be included in
  15. // all copies or substantial portions of the Software.
  16. //
  17. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  23. // THE SOFTWARE.
  24. //
  25. #import <Foundation/Foundation.h>
  26. #import <UIKit/UIKit.h>
  27. @interface REMenuItem : NSObject
  28. @property (strong, readwrite, nonatomic) UIColor *backgroundColor;
  29. @property (strong, readwrite, nonatomic) UIColor *separatorColor;
  30. @property (strong, readwrite, nonatomic) UIFont *font;
  31. @property (strong, readwrite, nonatomic) UIColor *textColor;
  32. @property (strong, readwrite, nonatomic) UIColor *textShadowColor;
  33. @property (assign, readwrite, nonatomic) CGSize textOffset;
  34. @property (assign, readwrite, nonatomic) CGSize textShadowOffset;
  35. @property (strong, readwrite, nonatomic) UIColor *highlightedBackgroundColor;
  36. @property (strong, readwrite, nonatomic) UIColor *highlightedSeparatorColor;
  37. @property (strong, readwrite, nonatomic) UIColor *highlightedTextColor;
  38. @property (strong, readwrite, nonatomic) UIColor *highlightedTextShadowColor;
  39. @property (assign, readwrite, nonatomic) CGSize highlightedTextShadowOffset;
  40. @property (assign, readwrite, nonatomic) NSTextAlignment textAlignment;
  41. @property (strong, readwrite, nonatomic) UIFont *subtitleFont;
  42. @property (strong, readwrite, nonatomic) UIColor *subtitleTextColor;
  43. @property (strong, readwrite, nonatomic) UIColor *subtitleTextShadowColor;
  44. @property (assign, readwrite, nonatomic) CGSize subtitleTextOffset;
  45. @property (assign, readwrite, nonatomic) CGSize subtitleTextShadowOffset;
  46. @property (strong, readwrite, nonatomic) UIColor *subtitleHighlightedTextColor;
  47. @property (strong, readwrite, nonatomic) UIColor *subtitleHighlightedTextShadowColor;
  48. @property (assign, readwrite, nonatomic) CGSize subtitleHighlightedTextShadowOffset;
  49. @property (assign, readwrite, nonatomic) NSTextAlignment subtitleTextAlignment;
  50. @property (copy, readwrite, nonatomic) NSString *title;
  51. @property (copy, readwrite, nonatomic) NSString *subtitle;
  52. @property (copy, readwrite, nonatomic) NSString *badge;
  53. @property (strong, readwrite, nonatomic) UIImage *image;
  54. @property (strong, readwrite, nonatomic) UIImage *highlightedImage;
  55. @property (copy, readwrite, nonatomic) void (^action)(REMenuItem *item);
  56. @property (assign, readwrite, nonatomic) NSInteger tag;
  57. @property (strong, readwrite, nonatomic) UIView *customView;
  58. - (id)initWithTitle:(NSString *)title image:(UIImage *)image highlightedImage:(UIImage *)highlightedImage action:(void (^)(REMenuItem *item))action;
  59. - (id)initWithTitle:(NSString *)title subtitle:(NSString *)subtitle image:(UIImage *)image highlightedImage:(UIImage *)highlightedImage action:(void (^)(REMenuItem *item))action;
  60. - (id)initWithCustomView:(UIView *)customView action:(void (^)(REMenuItem *item))action;
  61. - (id)initWithCustomView:(UIView *)customView;
  62. - (void)setNeedsLayout;
  63. @end