SORU
22 Temmuz 2010, PERŞEMBE


Sil butonu sağa UİTableViewCell göster

Nasıl UITableViewCell üzerine çekerken göstermek için Sil düğmesine alabilirim?

this post ama olay hiçbir zaman ortaya çıkar ve Sil düğmesi görünür hiçbir zaman takip ettim!

CEVAP
22 Temmuz 2010, PERŞEMBE


// During startup (-viewDidLoad or in storyboard) do:
self.tableView.allowsMultipleSelectionDuringEditing = NO;


// Override to support conditional editing of the table view.
// This only needs to be implemented if you are going to be returning NO
// for some items. By default, all items are editable.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return YES if you want the specified item to be editable.
    return YES;
}

// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        //add code here for when you hit delete
    }    
}

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Lamarr Wilson

    Lamarr Wilso

    27 Aralık 2008
  • SavageLuxxxGaming - Daily NBA 2K15 & NBA Live 15 Enjoy And Subscribe!

    SavageLuxxxG

    11 Ocak 2013
  • WK

    WK

    9 Ocak 2006