UIButton shows a default white background with round corners in iOS 6 but not in iOS 7

I need code that removes this background by default, in iOS 7 there is no problem since I do not see this background.

+7
ios ios6 ios7
source share
3 answers

If you select a button like UIButtonTypeCustom , there will be no default background

+17
source share

Try it,

 UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeCustom]; 
+2
source share

In iOS 7, by default, UIButton is like a hyperlink on a web page, with a transparent background and no borders. iOS 7 is actually a smaller border if you want to have corners and backgrounds, such as iOS 6, use a custom button. UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom] Now you can set the background and other things if you want.

0
source share

All Articles