Daniel Larsson
Daniel Larsson

Reputation: 6394

Change width of detail UILabel - iOS

Can you change the width of the detail UILabel on a left detail UITableView cell without subclassing it? In other words, the text in the left label is too long, and I want to move the center of the two labels to the right.

enter image description here

Upvotes: 2

Views: 775

Answers (1)

Mani
Mani

Reputation: 571

Yes, you can change the frame in the -layoutSubviews method

- (void)layoutSubviews
{
[super layoutSubviews];
self.detailTextLabel.frame = //yourFrame
}

Upvotes: 2

Related Questions