我的tableview顯示像這樣當我滾動.......你會幫助我犯了什麼錯誤? ?任何幫助,請你看到的圖像,i的值已經超過寫入選擇........UITableview單元格的值一遍又一遍地寫入問題?
http://www.freeimagehosting.net/image.php?fa76ce6c3b.jpg
代碼
- (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.textLabel.font = [UIFont boldSystemFontOfSize:14.0];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
CGRect rectLbl2 = CGRectMake(75 ,1, 215, 32);
CGRect rectLbl3 = CGRectMake(75 ,28, 215, 30);
addLabel2= [[UILabel alloc] initWithFrame:rectLbl2];
addLabel3= [[UILabel alloc] initWithFrame:rectLbl3];
addLabel2.text = @"senthil";
[cell addSubview:addLabel2];
[addLabel2 release]; // for memory release
addLabel3.text= @"senthil";
[cell addSubview:addLabel3];
[addLabel3 release];
return cell;
}
這將是我們更容易幫助你,如果你發佈你用它來把內容插入到細胞中的代碼。例如,你的'-tableView:cellForRowAtIndexPath:'方法中的代碼。 – 2009-10-31 04:35:51
我給了我的代碼 – 2009-10-31 11:09:16
,也改變了圖像 – 2009-10-31 11:52:14