ios - How to disable user interaction of section index for UITableView? -
I have applied a section index to the right of the table app, which is my app I would like to disable user interaction with that section index in some circumstances, but there is no property on How can I disable user interaction for the section index? I have disabled the interaction with the table so that you can not scroll or scroll to any cell, but it still allows the section to interact with the index, so This section will scroll to each section when tapping the section. If it is not possible to disable interaction with the section index, is there a way to prevent the scrolling of the table from changing? That's exactly what I wanted. I got a solution. Keep a BLL to know when section indexes should be disabled. Then indexed to prevent from scrolling in UITableView which allows access to the section index directly
self.tableView.userInteractionEnabled = NO;
tableview: sectionForSectionIndexTitle: atIndex: simply
return -1 .
- (NSInteger) Table view: (UITableView *) table view section ForSectionIndexTitle: Index on the title (NSString *): (NSInteger) Index {if (self.tableViewIsDisabled) {return -1; } ...}
Comments
Post a Comment