user1582281
user1582281

Reputation: 192

UIButton shows default white background with round corners in IOS 6 but no in IOS 7

I need a code that removes this default background, in IOS 7 there isn't a problem since I don't see this background.

Upvotes: 7

Views: 3877

Answers (3)

Raj Subbiah
Raj Subbiah

Reputation: 1292

Try this,

UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeCustom];

Upvotes: 2

Adnan Aftab
Adnan Aftab

Reputation: 14477

In iOS 7 default UIButton is like hyperlink in web page, with transparent background and no boarders. iOS 7 is actually border less now, If you want to have corners and backgrounds like iOS 6 use custom button. UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom] Now you can set background and other things if you want.

Upvotes: 0

slecorne
slecorne

Reputation: 1718

If you choose a button of type UIButtonTypeCustom, there will be no default background

Upvotes: 17

Related Questions