पर पुनरावृत्ति नियंत्रण दिखाते समय स्वाइप-टू-डिलीट सक्षम करना मैं UITableViewCell
एस के पुनर्वितरण की अनुमति देना चाहता हूं और हटाने के लिए स्वाइप के माध्यम से हटाना चाहता हूं, लेकिन लाल डिलीवरी सर्कल के माध्यम से नहीं।UITableView
- (void)loadView
{
[super loadView];
[table setEditing:YES animated:NO];
}
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Perform delete here
}
}
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
{
// Perform move here
}
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
{
return UITableViewCellEditingStyleDelete;
}
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
{
return YES;
}
साथ ही, मैं संपादन मोड अक्षम और कोई भाग्य के साथ -[UITableViewCell setShowsReorderControl:YES]
बुला की कोशिश की है।
Image http://booleanmagic.com/uploads/ReorderNotDelete.png
हाँ, मुझे पता है कर रहा हूँ एक संपत्ति है लगता है। "लिंक खाता" सुविधा काम नहीं कर सका। कम से कम प्रतिरोध का मार्ग केवल एक नया खाता बनाना और अनाथ अस्थायी बनाना था। – rpetrich