xiongxiong / WBSegmentControl

An easy to use, customizable segment control, can be used to show tabs.
MIT License
67 stars 12 forks source link

Changing contentBackgroundColor has no effect on background color #1

Open asper1988 opened 7 years ago

asper1988 commented 7 years ago

Property contentBackgroundColor is set to scroll view only in init() method so customizing it after initialization has no result. Could you please fix contentBackgroundColor handling?

milanrathod87 commented 7 years ago

I have resolved this issue by below line of code in initSegmentControl() method.

It works for me.

for view in segmentControl.subviews { view.backgroundColor = UIColor.blue }

xiongxiong commented 7 years ago

@asper1988 You should use backgroundColor property instantly, I've removed contentBackgroundColor property in new version.