黑马程序员技术交流社区
标题:
关于UIButton
[打印本页]
作者:
suihaixia54
时间:
2016-1-21 19:26
标题:
关于UIButton
// 快速创建一个按钮
+ (id)buttonWithType:(UIButtonType)buttonType;
// 设置按钮的内边距
@property(nonatomic) UIEdgeInsets contentEdgeInsets;
// 按钮内部的标签控件
@property(nonatomic,readonly,retain) UILabel *titleLabel;
// 按钮内部的图片控件
@property(nonatomic,readonly,retain) UIImageView *imageView;
// 设置内部titleLabel显示的文字
- (void)setTitle:(NSString *)title forState:(UIControlState)state;
// 设置内部titleLabel的文字颜色
- (void)setTitleColor:(UIColor *)color forState:(UIControlState)state;
// 设置内部imageView显示的图片
- (void)setImage:(UIImage *)image forState:(UIControlState)state;
// 设置背景图片
- (void)setBackgroundImage:(UIImage *)image forState:(UIControlState)state;
- (NSString *)titleForState:(UIControlState)state;
- (UIColor *)titleColorForState:(UIControlState)state;
- (UIImage *)imageForState:(UIControlState)state;
- (UIImage *)backgroundImageForState:(UIControlState)state;
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2