用户登录
用户注册

分享至

有没有办法隐藏 UIScrollView 中的滚动指示器?

  • 作者: 再打我可真生气了
  • 来源: 51数据库
  • 2022-10-20

问题描述

我有一个用例,其中这些指标会干扰用户交互.我可以子类化并覆盖一个方法或执行类似的操作来从滚动视图中删除滚动指示器吗?

I've got a use case where those indicators disturb the user interaction. Can I subclass and override a method or do something similar to remove the scroll indicators from the scroll view?

推荐答案

将UIScrollView的showsHorizo??ntalScrollIndicator和showsVerticalScrollIndicator属性设置为没有.

[tableView setShowsHorizontalScrollIndicator:NO];
[tableView setShowsVerticalScrollIndicator:NO];

文档 - UIScrollView

软件
前端设计
程序设计
Java相关