欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

iOS透明UIButton实现方法

程序员文章站 2022-07-15 16:42:29
...
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
    UIButton *sbutton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
   
    sbutton.backgroundColor = [UIColor clearColor];
   
    [sbutton addTarget:self action:@selector(changename) forControlEvents:UIControlEventTouchUpInside];

    return sbutton;
   
}