【发布时间】:2014-09-03 11:32:10
【问题描述】:
我尝试使用以下设置圆形按钮,但它从视图中消失了。如果我删除了
takebtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
然后它显示矩形按钮。帮我拿到 RoundedRect Button。
takebtn = [[UIButton alloc]initWithFrame:CGRectMake(30, 325, 250, 40)];
takebtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[takebtn setTitle:@"Take Photo" forState:UIControlStateNormal];
takebtn.backgroundColor=[UIColor colorWithRed:50.0/255.0 green:205.0/255.0 blue:50.0/255.0 alpha:1.0];
[takebtn addTarget:self
action:@selector(takePhoto:)
forControlEvents:(UIControlEvents)UIControlEventTouchDown];
[nextview addSubview:takebtn];
【问题讨论】:
标签: ios objective-c ios7 uibutton