I want to set scroll style to pink color in tableview.please give any suggestion for that.
but only available from this colors
[tableview setIndicatorStyle:UIScrollViewIndicatorStyleWhite];
Replace UIScrollViewIndicatorStyleWhite to anything from this typedef.
typedef enum {
UIScrollViewIndicatorStyleDefault,
UIScrollViewIndicatorStyleBlack,
UIScrollViewIndicatorStyleWhite
} UIScrollViewIndicatorStyle;
For the moment is not possible set a custom color in the Scroll. the only posible colors are white and black.
This code works for me, Swift-3
override func scrollViewDidScroll(_ scrollView: UIScrollView) {
let verticalIndicator = scrollView.subviews.last as? UIImageView
verticalIndicator?.image = nil
verticalIndicator?.backgroundColor = UIColor.red
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.