【发布时间】:2011-08-12 22:37:35
【问题描述】:
当我尝试在UITableview 中显示泰米尔语字符时,我无法平滑滚动tableview,但如果我将泰米尔语字符替换为英文字符,则滚动没有问题。
有什么解决办法吗?
提前致谢!!!
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if(cell == nil)
{
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.backgroundColor=[UIColor yellowColor];
UILabel *lblTitle = [[UILabel alloc]init];
[lblTitle setTag:100];
[lblTitle setBackgroundColor:[UIColor clearColor]];
[lblTitle setFont:[UIFont fontWithName:@"Helvetica" size:13]];
[lblTitle setFont:[UIFont boldSystemFontOfSize:14]];
[lblTitle setTextColor:[UIColor blackColor]];
[cell.contentView addSubview:lblTitle];
[lblTitle release];
}
UILabel *plblTitle = (UILabel*) [cell.contentView viewWithTag:100];
News *pNewsObj = [appDelegate.CurrentNewsArray objectAtIndex:indexPath.row];
plblTitle.text = pNewsObj.pHeadLine;
return cell;
}
【问题讨论】:
-
你用什么来显示泰米尔语字符?
-
我只是从 xml 中解析文本并将其显示在 UItableview 内的 UIlabel 中
-
能贴出cellForRowAtIndexPath的代码
标签: iphone uitableview scroll uifont tamil