Search code examples
iosobjective-ciphoneios7ios6.0

How Reduce the Width of ContentSize in UITableViewCell


How to Reduce the size of contentSize width of UITableViewCell.

-> I tried,in UITableView property but there had options for reduce the UITableViewCell contentSize of Height but not for Width.

-> I want to reduce the UITableViewCell contentSize width in UITableView.


Solution

  • // MyCustomUITableViewCell.m - (void)layoutSubviews {

    self.bounds = CGRectMake(self.bounds.origin.x,self.bounds.origin.y,self.bounds.size.width - 50,self.bounds.size.height);

    [super layoutSubviews];
    

    } http://natashatherobot.com/ios-frame-vs-bounds-resize-basic-uitableview-cell/'