猎豆优选

LDTabbar.h 1016B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // LDTabbar.h
  3. // YouHuiProject
  4. //
  5. // Created by liuxueli on 2019/2/25.
  6. // Copyright © 2019 kuxuan. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef NS_ENUM(NSUInteger, MCTabBarCenterButtonPosition){
  10. MCTabBarCenterButtonPositionCenter, // 居中
  11. MCTabBarCenterButtonPositionBulge // 凸出一半
  12. };
  13. @class LDTabbar;
  14. @interface LDTabbar : UITabBar
  15. /**
  16. 中间按钮
  17. */
  18. @property (nonatomic, strong) UIButton *centerBtn;
  19. /**
  20. 中间按钮图片
  21. */
  22. @property (nonatomic, strong) UIImage *centerImage;
  23. /**
  24. 中间按钮选中图片
  25. */
  26. @property (nonatomic, strong) UIImage *centerSelectedImage;
  27. /**
  28. 中间按钮偏移量,两种可选,也可以使用centerOffsetY 自定义
  29. */
  30. @property (nonatomic, assign) MCTabBarCenterButtonPosition position;
  31. /**
  32. 中间按钮偏移量,默认是居中
  33. */
  34. @property (nonatomic, assign) CGFloat centerOffsetY;
  35. /**
  36. 中间按钮的宽和高,默认使用图片宽高
  37. */
  38. @property (nonatomic, assign) CGFloat centerWidth, centerHeight;
  39. @end