You can pull out table view cells from the edge of the table view using your own class of table cells and overriding setFrame :. Sample code below.
This answer is based on Aumansoftware's answer (thanks! I would add this as a comment, but not enough rep). The problem with this answer is that it relies on a calling code that sets the frame from scratch and without making relative changes. This is often true, but not if the caller repeatedly modifies an existing frame. This has a side effect of squeezing the frame horizontally on every call. Turns out this is exactly what happens when using drag and drop across rows of a table! So this version just pulls around the edges from the parent view.
@interface MyTableViewCell : UITableViewCell /** * Pixel inset off left and right sides. */ @property (nonatomic, assign) CGFloat sideInset; @end @implementation MyTableViewCell - (void) setFrame:(CGRect)frame { if (self.superview) { CGFloat parentWidth = self.superview.frame.size.width; if (frame.size.width > (parentWidth - 2.0 * self.sideInset)) { frame.origin.x = self.sideInset; frame.size.width = parentWidth - (2.0f * self.sideInset); } } else { frame.origin.x = self.sideInset; frame.size.width = frame.size.width - (2.0f * self.sideInset); } [super setFrame:frame]; } @end
source share