joseria / JASwipeCell

iOS 8 Mail Inspired. A UITableViewCell subclass that displays customizable left or right buttons that are revealed as the user swipes the cell in either direction. The edge-most buttons will pin to the container view and will execute an event similar to how the delete/archive button work in IOS 8 mail.
MIT License
367 stars 53 forks source link

Auto-Sizing TableViewCells Not Working #7

Open fabb opened 9 years ago

fabb commented 9 years ago

I have Auto-Sizing TableViewCells (new iOS 8 feature). Now I incorporated JASwipeCell, and the autosizing is broken. Seems like the topContentView does not behave correctly. I noticed that the topContentView is added to the UITableView itself, but for the autosizing to work, the content must be added to the contentView of the UITableView.

joseria commented 9 years ago

Hi there,

If you look at JASwipeCell, I am using the cell's contentView to display the buttons underneath. I then add another view to the cell, topContentView, over the existing contentView that will display any content for the cell.

UITableViewCell: --> contentView (action buttons) --> topContentView (labels, etc)

Try subclassing JASwipeCell and add all your content to it's topContentView instead of the contentView. I'll publish an example using a storyboard shortly. That might help.

shaozi commented 9 years ago

Joseria, Do you have a storyboard example already?