我想填充我的表格視圖使用我的批註數組,但XCode似乎給我任何時候添加此代碼的斷點。註解和表格視圖
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
NSMutableArray *annotations = [[NSMutableArray alloc] init];
if(indexPath.section == 0)
{
for(Location *annotation in [(MKMapView *)self annotations])
{
if(![annotation isKindOfClass:[MKUserLocation class]])
{
}
}
cell.textLabel.text = [[annotations objectAtIndex:indexPath.row] title];
}
return cell;
我的註釋:
CLLocationCoordinate2D thecoordinate59;
thecoordinate59.latitude = 51.520504;
thecoordinate59.longitude = -0.106725;
Location *ann1 = [[Location alloc] init];
ann1.title [email protected]"Antwerp";
ann1.coordinate = thecoordinate1;
NSMutableArray *annotations = [NSMutableArray arraywithObjects: ann.. ann59, nil];
[map addAnnotations:annotations];
在此處發佈整個'tableView:cellForRowAtIndexPath:'方法。這有點凌亂。 – robertvojta 2012-08-16 12:14:29
什麼是錯誤? – Dustin 2012-08-16 12:23:57
for(在[(MKMapview *)自我註釋中的位置*註釋 – 2012-08-16 12:28:20