vicpenap / PrettyKit

PrettyKit for iOS is a small set of new widgets and UIKit subclasses that gives you a deeper UIKit customization. You will be able to change their background color, add gradients, shadows, etc.
http://vicpenap.github.com/PrettyKit
Other
1.22k stars 155 forks source link

Inserting and removing PrettyTableViewCell rounded corners not being redrawn #31

Open justjimmy opened 12 years ago

justjimmy commented 12 years ago

So if you start with 1 row and insert a new row in a grouped table, the first row will have rounded corners on top, but the now second row still has the 4 rounded corners.

Similar issue when you delete the first row of a grouped table.

To fix, I guess I could reload the affected rows (in my tableviewcontroller) every time an insert/delete is done... but I wonder if there's a way PrettyTableViewCell can handle it automatically?

Amnell commented 12 years ago

I don't think there is any sane way of making the cells do this automatically. Just call prepareForTableView:indexPath: on the affected cells in the corresponding UITableViewDelegate methods to redraw their backgrounds.