UIButton按钮用法
2012-03-24 10:43
183 查看
UIButton按钮用法:
UIButton *goButton = [UIButtonbuttonWithType:UIButtonTypeRoundedRect];//UIButtonTypeRoundedRect
**
[goButtonsetTitle:@"Go!"forState:UIControlStateNormal];
[goButtonsizeToFit];
[goButtonsetFrame:CGRectMake([viewframe].size.width-[goButtonframe].size.width+10,7,[goButtonframe].size.width,[goButtonframe].size.height)];
/*
点击按钮触发事件
*/
[goButtonaddTarget:selfaction:@selector(performLargeUpload2:)forControlEvents:UIControlEventTouchUpInside];
[viewaddSubview:goButton];
UIButton *goButton = [UIButtonbuttonWithType:UIButtonTypeRoundedRect];//UIButtonTypeRoundedRect
**
[goButtonsetTitle:@"Go!"forState:UIControlStateNormal];
[goButtonsizeToFit];
[goButtonsetFrame:CGRectMake([viewframe].size.width-[goButtonframe].size.width+10,7,[goButtonframe].size.width,[goButtonframe].size.height)];
/*
点击按钮触发事件
*/
[goButtonaddTarget:selfaction:@selector(performLargeUpload2:)forControlEvents:UIControlEventTouchUpInside];
[viewaddSubview:goButton];
相关文章推荐
- iOS 【Swift - 按钮(UIButton)的用法】
- Swift - 按钮(UIButton)的用法
- Swift - 按钮(UIButton)的用法
- Swift - 按钮(UIButton)的用法
- Swift - 按钮(UIButton)的用法
- Swift - 按钮(UIButton)的用法
- swift 3.0 按钮的用法(UIButton)
- Swift - 按钮(UIButton)的用法
- Swift - 按钮(UIButton)的用法
- Swift - 按钮(UIButton)的用法
- Swift - 按钮(UIButton)的用法
- Swift - 按钮(UIButton)的用法
- Swift - 按钮(UIButton)的用法
- Swift - 按钮(UIButton)的用法
- Swift - 按钮(UIButton)的用法
- Swift - 按钮(UIButton)的用法
- Swift - 按钮(UIButton)的用法
- swift-按钮(UIButton)用法
- Swift - 按钮(UIButton)的用法
- 如何调整UIButton里面的文字位置以及按钮文字右对齐