Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Setting the ON/OFF info of the cell
- NSString *settingDetails = @"My Details I want to display";
- NSString *settingON = @"This is the setting that is supposed to be on";
- NSString *settingOFF = @"This is the setting that is supposed to be off";
- NSMutableAttributedString *infoText = [[NSMutableAttributedString alloc]
- initWithString:[NSString stringWithFormat:@"%@ \n\n%@ \n\n%@", settingDetails, settingON, settingOFF]];
- // NSMutableAttributedString *infoText = [[NSMutableAttributedString alloc]
- // initWithString:[NSString stringWithFormat:@"Hello, how\n\n you doing?"]];
- [infoText addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0,4)];
- // cell.infoLabel.text = [[tableCellArray objectAtIndex:indexPath.row] detail];
- cell.infoLabel.attributedText = infoText;
Advertisement
Add Comment
Please, Sign In to add comment