मेरे पास एक UITableView है और मैंने इसमें संपादन क्रियाएं जोड़ दी हैं। अब मैं हटाना बटन लेबल ऊपर छवि को जोड़ने के लिए, के रूप में चाहते हैं:UITableView हटाएं बटन पर छवि कैसे जोड़ें?
यह मेरा कोड है:
func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
let blockAction = UITableViewRowAction(style: .Normal, title: "Block") { (rowAction:UITableViewRowAction, indexPath:NSIndexPath) -> Void in
//TODO: Delete the row at indexPath here
}
blockAction.backgroundColor = UIColor.redColor()
return [blockAction]
}
मैं अपने Delete
बटन पर छवि जोड़ सकते हैं कैसे?
@rmaddy जाने पर कैसे अन्य डेवलपर्स कि क्या ज़रूरत है? –
शायद वे एक तृतीय पक्ष कस्टम टेबल व्यू सेल क्लास का उपयोग कर रहे हैं और 'UITableViewDelegate' द्वारा प्रदान की गई मानक API का उपयोग नहीं कर रहे हैं। – rmaddy
इस प्रश्न का संदर्भ लें, आपको अपना उत्तर मिल जाएगा: http://stackoverflow.com/questions/20290766/change-the-color-of-default-red-color-delete-button-in-uitableviewcell-when- ---------------- http://stackoverflow.com/questions/29335104/how-add-custom-image-to-uitableview-cell-swipe-to -delete यदि आप iOS8 + –