- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
cell.selectionStyle = UITableViewCellSelectionStyleNone;
if (indexPath.section == 0) {
cell.accessoryType = UITableViewCellAccessoryNone;
if (indexPath.row == 0) {
cell.textLabel.text = NSLocalizedString(@"Username", @"");
account = [self createNewLabel];
account.text = @"this is xyz doing some work in xyz, xyz is also working with me and we are doing great work, We hope to continue good work in future and make this company in good position. I wanted to stayed in this company for long time to take this company in high value";
[cell.contentView addSubview:account];
}
if (indexPath.row == 1) {
cell.textLabel.text = NSLocalizedString(@"Password", @"");
contact = [self createNewLabel];
[cell.contentView addSubview:contact];
}
}
cell.textLabel.font = [UIFont boldSystemFontOfSize:15];
cell.textLabel.textColor = [UIColor blackColor];
return cell;
}
セル コンテンツ ビューでアカウント ラベル テキストを調整する方法