![](/img/trans.png)
[英]How to create a tableView with multiple column structure and horizontal scroll in iPhone SDK?
[英]how to customize scroll color of tableview in iphone sdk?
我想在 tableview 中將滾動樣式設置為粉紅色。請對此提出任何建議。
但僅可從此 colors
[tableview setIndicatorStyle:UIScrollViewIndicatorStyleWhite];
將 UIScrollViewIndicatorStyleWhite 替換為此 typedef 中的任何內容。
typedef enum {
UIScrollViewIndicatorStyleDefault,
UIScrollViewIndicatorStyleBlack,
UIScrollViewIndicatorStyleWhite
} UIScrollViewIndicatorStyle;
目前無法在 Scroll 中設置自定義顏色。 唯一可能的 colors 是白色和黑色。
這段代碼對我有用,Swift-3
override func scrollViewDidScroll(_ scrollView: UIScrollView) {
let verticalIndicator = scrollView.subviews.last as? UIImageView
verticalIndicator?.image = nil
verticalIndicator?.backgroundColor = UIColor.red
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.