Search code examples
iosiphoneobjective-cios7uiactionsheet

How to set background color for UIActionSheet


In the following method

- (void)willPresentActionSheet:(UIActionSheet *)actionSheet{

I have set:

[button setBackgroundColor:[UIColor redColor]];

This is for one button. But here is what I get:

enter image description here

What I want to know is how to set the color only on button without the side gaps ?

Any guidance or help is appreciated.

Thanks.


Solution

  • I also need the custom UIAcionSheet but default actionsheet doesn't support the customization functionality so i used the other customer controller UICustomActionSheet and got the expected result like

    enter image description here