开发者

Problem while disabling scrolling of UITableview

开发者_开发问答I am facing a problem while disabling the scrolling of table view.When i disabled the scrolling then the cells are not responding to user clicks,even delegates( like - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath) are not firing .Still dont know how to resolve looking for a solution Thanks in advance....


Simply set the property scrollEnabled inside your UITableViewController code. I tested the following successfully:

- (void)viewDidLoad {
    self.tableView.scrollEnabled = NO;
}


It will work by using In objC,

[_tblRoadBooks setScrollEnabled:NO];

In swift,

tbl.isScrollEnabled = false

Hope it will help you :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜