UI_UIButton
来源:互联网 发布:qt界面编程实例 编辑:程序博客网 时间:2024/05/16 08:56
#import "AppDelegate.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (void)dealloc
{
[_window release];
[super dealloc];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
[_window release];
//用button自己的便利构造器的方式来创建对象
UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
// 指定button的位置和大小
button.frame = CGRectMake(100,100, 150, 70);
button.backgroundColor = [UIColor cyanColor];
[self.window addSubview:button];
// button不用release
// 给button设置标题
[button setTitle:@"确认" forState:UIControlStateNormal];
// 标题的字体大小
button.titleLabel.font = [UIFont systemFontOfSize:40];
// 设置下圆角
button.layer.cornerRadius =20;
// 边框
button.layer.borderWidth =1;
/// 点击方法 button最重要的方法
[button addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
return YES;
}
- (void)click:(UIButton *)button{
NSLog(@"测试按钮的点击方法");
}
- UI_UIButton
- android studio下使用android的日志api
- (4) SQL 语句 - 表基本操作
- iOS UI01_UIView
- UI_UILabel
- ArcGIS Desktop 10.1+ArcEngine10.1完全破解安装教程
- UI_UIButton
- 社会友谊和人群移动:基于位置的社交网络中的用户移动(一)
- CodeForces 18A Triangle好暴力啊→_→
- arm mmu源码分析
- UI_简单的NeonLignt
- html编写的过程中,为什么font设置属性的时候,第二个属性不起作用
- 7月英语——牙牙学语
- 浅谈 System.Decimal 结构
- 浅谈 System.Linq.Enumerable.AsEnumerable 方法