Mah*_*hek 9 cocoa-touch objective-c uitableview uikit ios
我想向用户显示下面有更多内容,但是当我们滚动tableview时,UITableView只显示滚动指示器.有任何方法,所以我总能显示滚动指示器
小智 6
-(void)viewDidAppear:(BOOL)animated{
timer = [NSTimer scheduledTimerWithTimeInterval:0.8 target:self selector:@selector(indicator:) userInfo:nil repeats:YES];
}
-(void)viewDidDisappear:(BOOL)animated{
[timer invalidate];
}
-(void)indicator:(BOOL)animated{
[tableViewer flashScrollIndicators];
NSLog(@"asda");
}
Run Code Online (Sandbox Code Playgroud)
只需闪烁滚动条
(据我所知)没有办法永久显示滚动条。你可以
[tableView flashScrollIndicators]
Run Code Online (Sandbox Code Playgroud)
在-viewDidAppear:显示视图时短暂显示滚动条。
另外,如果您有很多条目,您可能需要考虑在右侧显示(按字母顺序排列的)部分索引。为此,请-sectionIndexTitlesForTableView在您的UITableViewDataSource. 使用tableView.sectionIndexMinimumDisplayRowCount您可以定义显示部分索引的最小条目数。
| 归档时间: |
|
| 查看次数: |
10259 次 |
| 最近记录: |