wimagguc / ios-custom-alertview

Custom UIAlertView. Continue adding images and UIViews to dialogs in iOS7+
Other
1.66k stars 394 forks source link

The backgroundColor of the alertView #80

Closed iamjjh closed 8 years ago

iamjjh commented 9 years ago

Hello, When I set demoView.backgroundColor = [UIColor whiteColor]; It become like this picture

qq20150804-1 2x

if I want to change the view and buttonview backgroundColor, what should I do?

tanranran commented 8 years ago

+1

quetool commented 8 years ago

if you want to change the backgroundcolor of the entire alert you have to edit the CustomIOSAlertView.m

in -(UIVIew *)createContainerView look for

gradient.colors = [NSArray arrayWithObjects: (id)[[UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0f] CGColor], (id)[[UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0f] CGColor], (id)[[UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0f] CGColor], nil];

iamjjh commented 8 years ago

thanks!