ios - How do I change the colour of scroll bar Indicator in UICollectionView apart from Default,Black or White? -
i want change color of horizontal scroll bar indicator of uicollectionview, apart default, black or white done in storyboard?
you can use delegate method : 'scrollviewdidscroll' , add
//get refrence of vertical indicator
uiimageview *verticalindicator = ((uiimageview *)[scrollview.subviews objectatindex:(scrollview.subviews.count-1)]); //set color vertical indicator [verticalindicator setbackgroundcolor:[uicolor redcolor]]; //get refrence of horizontal indicator uiimageview *horizontalindicator = ((uiimageview *)[scrollview.subviews objectatindex:(scrollview.subviews.count-2)]); //set color horizontal indicator [horizontalindicator setbackgroundcolor:[uicolor bluecolor]];
Comments
Post a Comment