ios - How to change UIScrollView Indicator color? -


when use uicolor.blue changing, when try apply rgb, not reflected in scrollview indicator.

func scrollviewdidscroll(_ scrollview: uiscrollview) {     let verticalindicator: uiimageview = (scrollview.subviews[(scrollview.subviews.count - 1)] as! uiimageview)     verticalindicator.backgroundcolor = uicolor(red: 211/255, green: 138/255, blue: 252/255, alpha: 1) //        verticalindicator.backgroundcolor = uicolor.blue  } 

i think problem here

verticalindicator.backgroundcolor = uicolor(red: 211/255, green: 138/255, blue: 252/255, alpha: 1) 

change

verticalindicator.backgroundcolor = uicolor(red: 211/255.0, green: 138/255.0, blue: 252/255.0, alpha: 1). 

the result of division 211/255 type of integer return 0 or 1 (in case think 0).


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -