通过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];
以后完善
时间: 2024-11-06 07:05:47