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

Animation of cell in edit mode. #2

Closed shingoo79 closed 12 years ago

shingoo79 commented 12 years ago

The custom view of the PrettyCustomViewTableViewCell will now shrink and animate correctly when entering edit mode.

vicpenap commented 12 years ago

Hi!

Thanks for your contribution! It works pretty well, but there are two things I'm trying to improve:

When entering edit mode, the animation works OK, but the right corners aren't masked to the cell's size.

When existing from edit mode, the mask isn't correctly applied.

I'm currently working on that, but if you know how to solve it, don't hesitate to do it :)

Cheers!

vicpenap commented 12 years ago

OK, I've fixed the second issue, changing this (in layoutSubviews):

self.customView.layer.mask = self.mask;

With this:

self.customView.layer.mask.position = self.customView.center;
self.customView.layer.mask.bounds = b;

But the right corner isn't being masked yet. I think that's due to the mask's bounds, but I don't know how to fix it yet.

shingoo79 commented 12 years ago

I did not realize that the segmented cell is also a custom view cell. That's the reason why i did not test that. I am not sure how to solve this. If I find the time I will take a look at that problem and try to fix it. But right now I don't have a clue... Sorry.

vicpenap commented 12 years ago

I'm closing this pull request until new progress on it.