摘要: UIbutton作为简单且频繁被使用的控件,其地位在整个app开发中不可小视。在IB中使用button相对来说很简单,很容易上手,但在多视图开发中button通常会被即时生成,并设置其属性和功能,即通过代码生成。如下是我对button的理解。//创建圆角button UIButton *button = [UIButtonbuttonWithType:UIButtonTypeRoundedRect]; //指定button的位置和大小 button.frame = CGRectMake(10, 10, 75, 75); //给button设置标签,用来辨别点击的是哪个button,常... 阅读全文
posted @ 2012-04-05 16:48 不染凡尘 阅读(932) 评论(0) 推荐(1) 编辑
摘要: 详细使用:UILabel *label = [[UILabelalloc] initWithFrame:CGRectMake(0, 0, 75, 40)]; //声明UIlbel并指定其位置和长宽label.backgroundColor = [UIColorclearColor]; //设置label的背景色,这里设置为透明色。label.font = [UIFont fontWithName:@"Helvetica-Bold" size:13]; //设置label的字体和字体大小。label.transform = CGAffineTransformMakeRotat 阅读全文
posted @ 2012-04-05 13:33 不染凡尘 阅读(9180) 评论(2) 推荐(2) 编辑