Tamil_Arya
Tamil_Arya

Reputation: 29

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.

Upvotes: 1

Views: 644

Answers (2)

Tamil_Arya
Tamil_Arya

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

Anoop
Anoop

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

Related Questions