CustomButton.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // customButton.h
  3. // 项目-iWeiBo
  4. //
  5. // Created by student on 14-9-16.
  6. // Copyright (c) 2014年 student. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef enum{
  10. ImagePostionNoImage = 0,
  11. ImagePostionLeft,
  12. ImagePostionRight,
  13. ImagePostionTop,
  14. ImagePostionBottom,
  15. ImagePostionDefault,
  16. ImagePostionCustom
  17. }ImagePostion;
  18. typedef enum{
  19. //比例
  20. LayoutTypeRatio,
  21. //间距
  22. LayoutTypeMargin
  23. }LayoutType;
  24. @interface CustomButton : UIButton
  25. - (id)initCustomBtnWithImageDirection:(ImagePostion)imagePosition imageViewSize:(CGSize)imageSize imageLabelMargin:(CGFloat)imageLabelMargin titleLabelFont:(UIFont *)titleLabelFont imageIcon:(NSString *)imageIcon selectIcon:(NSString *)selectIcon title:(NSString *)title btnWidth:(CGFloat)btnWidth;
  26. //readonly
  27. @property (nonatomic , assign) CGFloat customBtnHeight;
  28. @property (nonatomic , assign) CGFloat imageToTextRatioFloat;
  29. @property (nonatomic , assign)LayoutType layoutType;
  30. @property (nonatomic, assign)ImagePostion imagePostion;
  31. @property (nonatomic , assign) CGSize imageSize;
  32. @property (nonatomic , strong) UIFont *titleLabelFont;
  33. @property (nonatomic , assign) CGFloat imageLabelMargin;
  34. @property (nonatomic, assign)BOOL isClickCycle;
  35. @property (nonatomic, assign)CGRect imageFrame;
  36. #warning 2016-12-19 新增, 唯一标识符
  37. @property (nonatomic , copy) NSString *uuid;
  38. @end