Created
September 2, 2013 10:25
-
-
Save flashlib/6411438 to your computer and use it in GitHub Desktop.
Multi-line UITableViewCell using UILabel
This file contains hidden or 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
static NSString *CellIdentifier = @"MyCell"; | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
if (cell == nil) { | |
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 | |
reuseIdentifier:CellIdentifier] autorelease]; | |
} | |
cell.textLabel.text = @"Label'; | |
cell.detailTextLabel.text = @"Multi-Line\nText"; | |
cell.detailTextLabel.numberOfLines = 2; | |
cell.detailTextLabel.lineBreakMode = UILineBreakModeWordWrap; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!