5
मेरा प्रश्न इस तरह है:पुन: व्यवस्थित करें UITableView और छिपाने पुन: व्यवस्थित करें नियंत्रण
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
return YES;
}
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
return UITableViewCellEditingStyleNone;
}
- (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath {
return NO;
}
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
return YES;
}
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath{
}
और
[self.tableView setEditing:YES];
......
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
ItemTableViewCell *cell = (ItemTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"ItemTableViewCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
}
// ...
cell.showsReorderControl = NO;
return cell;
}
संदर्भ:: reordering control in UITableView
नतीजा यह है कि है Reordering UITableView without reorder control, मैं इन पद्धतियों का उपयोग टेबल को फिर से व्यवस्थित किया जा सकता है, लेकिन रीडर नियंत्रण कभी भी को छुपा नहीं सकता है। तो मुझे आश्चर्य है कि मैं गलत हूं, या अगर कोई मेरी मदद कर सकता है? धन्यवाद।
लिए उपयोगी हो सकता है कर सकते हैं मैं कोशिश कर सुझाव देते हैं [BVReorderTableView] (https://github.com/bvogelzang/BVReorderTableView)? UITableView सेल सबव्यूज़ को हैक करने के बजाय यह थोड़ा क्लीनर समाधान प्रदान करता है। – bvogelzang