UIButton
来源:互联网 发布:矩阵可逆的条件 编辑:程序博客网 时间:2024/05/17 01:04
#pragma mark - 加载视图- (void)viewDidLoad { [super viewDidLoad]; CGRect frame = CGRectMake(20, 20, 100, 100); self.btn = [UIButton buttonWithType:UIButtonTypeSystem]; self.btn.frame = frame; //设置标题 [self.btn setTitle:@"按钮" forState:UIControlStateNormal]; // typedef enum { // UIButtonTypeCustom = 0, // UIButtonTypeSystem, // UIButtonTypeDetailDisclosure, // > 箭号 // UIButtonTypeInfoLight, // UIButtonTypeInfoDark, // i 号 // UIButtonTypeContactAdd, // + 号 // UIButtonTypeRoundedRect, // 圆矩形 // } UIButtonType; [self.btn addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:self.btn]; }#pragma mark - 做todo事件- (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated.}#pragma mark --(IBAction)click:(id)sender{ UIButton *btn = (UIButton *)sender; NSString *string = btn.titleLabel.text; NSLog(@"%@",string);}
0 0
- UIButton
- UIButton
- UIButton
- uibutton
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UIBUTTON
- UIButton
- UIButton
- UIButton
- UIBUTTON
- UIButton
- UIButton
- UIButton
- JSON继承JsonConverter序列化与反序列化重写类属性
- 单选按钮 默认选中
- 加载网页
- 如果查看应用性能图表是一种信仰
- C++内存管理详解
- UIButton
- SAX解析XML 详解
- 高德导航HOME键后台运行会报错
- libcurl使用认证证书 https认证
- 将json转换成bean
- dos命令大全
- Webdriver自动化测试使用Xpath-Helper调试页面元素的xpath
- Away3D 4.0环境配置
- 百度云消息推送