Iphone UIButton background color
问题 I'm creating some UIButton s programmatically in a loop but I'm having some problem with setting the background color of the button. The color of the button always shows up as white. But works fine with I'm only using 2 colors in the backgroundcolor. Eg : red : 255 green:0 blue :200 Here is the code I'm using to add the button. UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; button.frame = CGRectMake(80, 20 + (i*75), 200, 75); button.layer.cornerRadius = 10; button.layer