UIBarButtonItem+YYAdd.h 791 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // UIBarButtonItem+YYAdd.h
  3. // YYKit <https://github.com/ibireme/YYKit>
  4. //
  5. // Created by ibireme on 13/10/15.
  6. // Copyright (c) 2015 ibireme.
  7. //
  8. // This source code is licensed under the MIT-style license found in the
  9. // LICENSE file in the root directory of this source tree.
  10. //
  11. #import <UIKit/UIKit.h>
  12. NS_ASSUME_NONNULL_BEGIN
  13. /**
  14. Provides extensions for `UIBarButtonItem`.
  15. */
  16. @interface UIBarButtonItem (YYAdd)
  17. /**
  18. The block that invoked when the item is selected. The objects captured by block
  19. will retained by the ButtonItem.
  20. @discussion This param is conflict with `target` and `action` property.
  21. Set this will set `target` and `action` property to some internal objects.
  22. */
  23. @property (nullable, nonatomic, copy) void (^actionBlock)(id);
  24. @end
  25. NS_ASSUME_NONNULL_END