ios - UITableViewRowAction Cell with Corner Radius Changes Background Color -


when uitableviewrowaction swipe happens cell background associated action changes it's background color white, instead of black typically is. in other words, color can see behind corner radius of cell changes swipe action. see example image below.

i've set background color black on view, tableview, cell, i'm not sure how white showing up. ideas or suggestions welcome!

// swiping setup tableview. func tableview(_ tableview: uitableview, editactionsforrowat indexpath: indexpath) -> [uitableviewrowaction]? {      let dislikeactivity = uitableviewrowaction(style: .default, title: "don't this") { action, index in         print("dislike button tapped")     }             return [dislikeactivity]  } 

cell corner radius background white

to fix issue changed background color of cell default in interface builder (xib) , set background of cell in willdisplay cell function noted below.

func tableview(_ tableview: uitableview, willdisplay cell: uitableviewcell, forrowat indexpath: indexpath) {      cell.backgroundcolor = uicolor(red: 245/255, green: 250/255, blue: 240/255, alpha: 1)  } 

background of tableview still set black in interface builder. i'm still not sure why did trick, did , shows corner radius.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -