Change width and colour of scroll bar in UITableView, iphone

前端 未结 8 1519
时光说笑
时光说笑 2020-11-30 06:53

I could only find if one wants to display scroll bar or not using

tableView.showsVerticalScrollIndicator = YES/NO;

but how can I customize

相关标签:
8条回答
  • 2020-11-30 07:14

    You can set only style of scroll indicators:

    The style of the scroll indicators.

    @property(nonatomic) UIScrollViewIndicatorStyle indicatorStyle
    

    Styles:

    Scroll Indicator Style The style of the scroll indicators. You use these constants to set the value of the indicatorStyle style.

    typedef enum {
        UIScrollViewIndicatorStyleDefault,
        UIScrollViewIndicatorStyleBlack,
        UIScrollViewIndicatorStyleWhite
    } UIScrollViewIndicatorStyle;
    

    For example:

    tableView.indicatorStyle = UIScrollViewIndicatorStyleBlack;
    
    0 讨论(0)
  • You can add this great open source custom scrollbar to your project, its totally customisable: https://github.com/BasheerSience/BRScrollBar

    0 讨论(0)
提交回复
热议问题