设置button为圆形
通过layler
// 创建头像视图
UIButton *logoButton = [[UIButton alloc] init];
logoButton.frame = CGRectMake(50, 50, 100, 100);
logoButton.layer.cornerRadius = 50;
logoButton.backgroundColor = [UIColor redColor];
[self.view addSubview:logoButton];
logoButton.frame = CGRectMake(50, 50, 100, 100);
logoButton.layer.cornerRadius = 50;
logoButton.backgroundColor = [UIColor redColor];
[self.view addSubview:logoButton];
以后完善