FWButtonWrapper

@interface FWButtonWrapper : FWControlWrapper

Undocumented

FWUIKit

  • 自定义按钮禁用时的alpha,如0.5,默认0不生效

    Declaration

    Objective-C

    @property (nonatomic) CGFloat disabledAlpha;
  • 自定义按钮高亮时的alpha,如0.5,默认0不生效

    Declaration

    Objective-C

    @property (nonatomic) CGFloat highlightedAlpha;
  • 快速设置文本按钮

    Declaration

    Objective-C

    - (void)setTitle:(nullable NSString *)title
                font:(nullable UIFont *)font
          titleColor:(nullable UIColor *)titleColor;
  • 快速设置文本

    Declaration

    Objective-C

    - (void)setTitle:(nullable NSString *)title;
  • 快速设置图片

    Declaration

    Objective-C

    - (void)setImage:(nullable UIImage *)image;
  • 设置图片的居中边位置,需要在setImage和setTitle之后调用才生效,且button大小大于图片+文字+间距

    imageEdgeInsets: 仅有image时相对于button,都有时上左下相对于button,右相对于title titleEdgeInsets: 仅有title时相对于button,都有时上右下相对于button,左相对于image

    Declaration

    Objective-C

    - (void)setImageEdge:(UIRectEdge)edge spacing:(CGFloat)spacing;