UIbutton
2015-11-20 17:22
417 查看
一:初始化
UIButton的初始化一般使用其类方法,+ (id)buttonWithType:(UIButtonType)buttonType;
枚举类型
二属性设置
set方法
四一些获取方法
只读属性
btn最重要的触发事件由于其是继承的uicontrol,不描述
UIButton的初始化一般使用其类方法,+ (id)buttonWithType:(UIButtonType)buttonType;
枚举类型
//用户自定义,无风格 UIButtonTypeCustom = 0, //系统默认风格 UIButtonTypeSystem NS_ENUM_AVAILABLE_IOS(7_0), UIButtonTypeDetailDisclosure, UIButtonTypeInfoLight, UIButtonTypeInfoDark, //创建+号按钮 UIButtonTypeContactAdd, //废弃 UIButtonTypeRoundedRect = UIButtonTypeSystem, };
二属性设置
set方法
四一些获取方法
- (NSString *)titleForState:(UIControlState)state; - (UIColor *)titleColorForState:(UIControlState)state; - (UIColor *)titleShadowColorForState:(UIControlState)state; - (UIImage *)imageForState:(UIControlState)state; - (UIImage *)backgroundImageForState:(UIControlState)state; - (NSAttributedString *)attributedTitleForState:(UIControlState)state NS_AVAILABLE_IOS(6_0);
只读属性
@property(nonatomic,readonly,retain) NSString *currentTitle; @property(nonatomic,readonly,retain) UIColor *currentTitleColor; @property(nonatomic,readonly,retain) UIColor *currentTitleShadowColor; @property(nonatomic,readonly,retain) UIImage *currentImage; @property(nonatomic,readonly,retain) UIImage *currentBackgroundImage; @property(nonatomic,readonly,retain) NSAttributedString *currentAttributedTitle NS_AVAILABLE_IOS(6_0); @property(nonatomic,readonly,retain) UILabel *titleLabel NS_AVAILABLE_IOS(3_0); @property(nonatomic,readonly,retain) UIImageView *imageView NS_AVAILABLE_IOS(3_0);
btn最重要的触发事件由于其是继承的uicontrol,不描述
相关文章推荐
- label不同颜色不同字体及加删除线
- UIlabel以及其UIfont
- 创建rabbitmq:virtual host、exchange、queue
- TestStand与LabVIEW UI 交互
- iOS: 使用CGContextRef,CGPath和UIBezierPath来绘画
- 百度ue富文本编辑器setContent方法报错
- UIViewController的生命周期
- UniGui中使用Grid++Report报表控件子报表获取数据的方法
- easyui常用控件常用方法
- MyBatis+Gson+Jersey+EasyUI的增删改例子
- Codeforces Beta Round #85 (Div. 1 Only) A. Petya and Inequiations 贪心
- cannot access storage file (as uid:107, gid:107)permission denied
- AD 域控查询命令 dsquery
- UIView的生命周期
- iOS经典讲解之UIImage初始化一张图片的方法及优缺点
- GPUImage简单滤镜使用(一)
- UITextView在光标处插入字符串
- iOS- 添加UIWindow蒙版
- 关于UGUI的EventSystem的学习
- 那些年,我们一起追的面试题。。to be continued!!!