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 :)
精彩评论