How Reduce the Width of ContentSize in UITableViewCell

643 Views Asked by At

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.

2

There are 2 best solutions below

0
Tamil_Arya On BEST ANSWER

// 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/'

1
Anoop On

You can not reduce cell width using cell property. You need to change UITableView frame size. Set width whatever you want to set.