iOS给UIButton设置圆角

来源:互联网 发布:orcl 删除重复数据 编辑:程序博客网 时间:2024/06/05 05:19
    UIButton* removeBn = [UIButton buttonWithType:UIButtonTypeRoundedRect];    removeBn.backgroundColor = [UIColor redColor];    removeBn.layer.masksToBounds = YES;    removeBn.layer.cornerRadius = 8.0;    removeBn.frame = CGRectMake(230, 30, 60, 40);    [removeBn setTitle:@"删除" forState:UIControlStateNormal];    [removeBn addTarget:self action:@selector(remove:) forControlEvents:UIControlEventTouchUpInside];    [self.view addSubview:addBn];    [self.view addSubview:removeBn];

0 0
原创粉丝点击