react-native-navigation的迁移库

MMDrawerBarButtonItem.h 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
  2. //
  3. // Permission is hereby granted, free of charge, to any person obtaining a copy
  4. // of this software and associated documentation files (the "Software"), to deal
  5. // in the Software without restriction, including without limitation the rights
  6. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. // copies of the Software, and to permit persons to whom the Software is
  8. // furnished to do so, subject to the following conditions:
  9. //
  10. // The above copyright notice and this permission notice shall be included in
  11. // all copies or substantial portions of the Software.
  12. //
  13. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. // THE SOFTWARE.
  20. #import <UIKit/UIKit.h>
  21. /**
  22. `MMDrawerBarButtonItem` provides convenience methods to create `UIBarButtonItems` with a default hamburger-menu asset.
  23. */
  24. @interface MMDrawerBarButtonItem : UIBarButtonItem
  25. ///---------------------------------------
  26. /// @name Initializing a `MMDrawerBarButtonItem`
  27. ///---------------------------------------
  28. /**
  29. Creates and initializes an `MMDrawerBarButtonItem` without a border.
  30. @param target The target to forward the `action` to when the button is pressed.
  31. @param action The action to call when the button is pressed.
  32. @return The newly-initialized bar button item.
  33. */
  34. -(instancetype)initWithTarget:(id)target action:(SEL)action;
  35. /**
  36. Returns the current color of the menu button for the state requested. This property is deprecated in iOS 7.0. Use `tintColor` instead.
  37. @param state The UIControl state that the color is being requested for.
  38. @return The menu button color for the requested state.
  39. */
  40. -(UIColor *)menuButtonColorForState:(UIControlState)state __attribute__((deprecated("Use tintColor instead")));
  41. /**
  42. Sets the color of the menu button for the specified state. For this control, only set colors for `UIControlStateNormal` and `UIControlStateHighlighted`. This property is deprecated in iOS 7.0. Use `tintColor` instead.
  43. @param color The color to set.
  44. @param state The state to set the color for.
  45. */
  46. -(void)setMenuButtonColor:(UIColor *)color forState:(UIControlState)state __attribute__((deprecated("Use tintColor instead")));
  47. /**
  48. Returns the current color of the shadow for the state requested. This property is deprecated in iOS 7.0. The menu button no longer supports a shadow.
  49. @param state The UIControl state that the color is being requested for.
  50. @return The menu button color for the requested state.
  51. */
  52. -(UIColor *)shadowColorForState:(UIControlState)state __attribute__((deprecated("Shadow is no longer supported")));
  53. /**
  54. Sets the color of the shadow for the specified state. For this control, only set colors for `UIControlStateNormal` and `UIControlStateHighlighted`. This property is deprecated in iOS 7.0. The menu button no longer supports a shadow.
  55. @param color The color to set.
  56. @param state The state to set the color for.
  57. */
  58. -(void)setShadowColor:(UIColor *)color forState:(UIControlState)state __attribute__((deprecated("Shadow is no longer supported")));
  59. @end