Reputation: 29
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
.
Upvotes: 1
Views: 644
Reputation: 29
// 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/'
Upvotes: 0
Reputation: 419
You can not reduce cell width using cell property. You need to change UITableView frame size. Set width whatever you want to set.
Upvotes: 1