iOS 创建一个内外角都有弧度的圆角button

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

   UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(2, 2, 100, 100)];
    btn.backgroundColor = [UIColor redColor];
    btn.layer.cornerRadius = 3;
    UIView *view = [[UIView alloc]initWithFrame:CGRectMake(99, 99, 104, 104)];
    view.backgroundColor = [UIColor blueColor];
    
    view.layer.cornerRadius = 3;
    [self.view addSubview:view];
    [view addSubview:btn];