0

calling button.selected = true does not fills the entire button frame with tint color.

Expected result

The button should be filled entirely with the tint color in selected state.

Actual result

The tint color only filled the the area around the text in button.

actual result

How to fill the entire button frame(area) with the color when the button is in selected(or any other) state?

Community
  • 1
  • 1
harsh_v
  • 3,193
  • 3
  • 34
  • 53

2 Answers2

0

Use the backgroundColor instead of tintColor.
You can set it in the Storyboard button's properties. Under "view" section.

David Ansermot
  • 6,052
  • 8
  • 47
  • 82
  • I want different colors for different state. like transparent color for normal state & some other color for selected state – harsh_v May 17 '16 at 12:54
0

As David already said, try changing the background color instead.

If you want to change it through storyboard, then have a look at the attached screenshot.

ChangeButtonBg Screenshot