直接上代码
UIButton *temp = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[temp setTitle:@“test” forState:UIControlStateNormal];
[temp setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
苹果开发群 :414319235 欢迎加入 欢迎讨论问题