1
테이블보기가 있습니다 .i 글꼴 크기를 줄이고 문자 길이를 5 자로 자르고 cell.detailTextLabel.text
.cud u guys help me out. . 코드는 다음과 같습니다.글꼴 크기를 줄이고 ios tableview에서 텍스트 레이블을 자르는 방법
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
//NSInteger SectionRows=[tableView1 numberOfRowsInSection:indexPath.section];
//NSInteger Row=indexPath.row;
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];
}
//cell.imageView.backgroundColor=[UIColor clearColor];
cell.selectionStyle=UITableViewCellSelectionStyleNone;
cell.textLabel.text=[listOfItems objectAtIndex:indexPath.row];
cell.textLabel.backgroundColor=[UIColor clearColor];
cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
if (indexPath.row == 3)
{
[email protected]"Aktiviteter";
}
if (indexPath.row == 4)
{
cell.textLabel.textColor=[UIColor purpleColor];
[email protected]"Läs mer om Allegra";
}
if (indexPath.row == 5)
{
starImage.image = [UIImage imageNamed:@"add.png"];
[cell.contentView addSubview:starImage];
}
return cell;
}
처럼 될 것이다, 다음과 같이
만 할 문자열의 처음 5 개 문자를 표시하려면? – Ilanchezhian감사합니다 사람이 일한 .. – stephensam