您的位置:首页 > 产品设计 > UI/UE

UIButton

2016-04-08 11:54 211 查看
UIButton*button=[UIButton
buttonWithType:(UIButtonTypeRoundedRect)];

button.frame=CGRectMake(150, 450, 100, 50);

button.backgroundColor=[UIColor
redColor];

[button setTitle:@"Click"
forState:UIControlStateNormal];

//button交互事件-点击button改变label的文字

[button addTarget:self
action:@selector(gaibian)
forControlEvents:UIControlEventTouchUpInside];

[self.view
addSubview:button];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: