Created
January 6, 2015 20:27
-
-
Save fwhenin/2c2492ec3f6c600a66ac to your computer and use it in GitHub Desktop.
Increase the size of the textLabel in UITableViewCellStyle.Value2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func layoutSubviews() { | |
super.layoutSubviews(); | |
var offset = CGFloat(20); | |
var labelWidth = CGFloat(120); | |
var space = CGFloat(5); | |
var labelHeight = CGFloat(21); | |
var cellHeight = CGFloat(44); | |
var labelTopMargin = (cellHeight - labelHeight)/2; | |
// change frame of one or more labels | |
self.textLabel!.frame = CGRectMake(0, labelTopMargin, labelWidth, labelHeight); | |
self.detailTextLabel!.frame = CGRectMake(labelWidth + space, labelTopMargin, 300-labelWidth-space, labelHeight); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment