- (void)setTitle:(NSString *)title forState:(UIControlState)state;
设置按钮的文字

- (void)setTitleColor:(UIColor *)color forState:(UIControlState)state;
设置按钮的文字颜色

- (void)setImage:(UIImage *)image forState:(UIControlState)state;
设置按钮内部的小图片

- (void)setBackgroundImage:(UIImage *)image forState:(UIControlState)state;
设置按钮的背景图片

设置按钮的文字字体(需要拿到按钮内部的label来设置)
btn.titleLabel.font = [UIFont systemFontOfSize:13];

- (NSString *)titleForState:(UIControlState)state;
获得按钮的文字

- (UIColor *)titleColorForState:(UIControlState)state;
获得按钮的文字颜色

- (UIImage *)imageForState:(UIControlState)state;
获得按钮内部的小图片

- (UIImage *)backgroundImageForState:(UIControlState)state;
获得按钮的背景图片

相关文章:

  • 2022-01-01
  • 2022-02-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-02
  • 2022-03-03
  • 2021-12-04
  • 2022-12-23
  • 2021-10-21
  • 2021-12-30
  • 2022-12-23
相关资源
相似解决方案