设置button为圆形


通过layler

   // 创建头像视图

    UIButton *logoButton = [[UIButton alloc] init];
    logoButton.frame = CGRectMake(5050100100);
    logoButton.layer.cornerRadius = 50;
    logoButton.backgroundColor = [UIColor redColor];
    [self.view addSubview:logoButton];

 以后完善 

原文地址:https://www.cnblogs.com/yuanjunliang/p/4601512.html