我有一个我的应用程序的视图,显示标签中的信息,问题是这个标签在iOS 7中是空的,但在iOS 6中工作正常,我无法找到原因。
这是用于获取视图控制器并显示数据的方法:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
ShoppeDetailViewController *detailViewController = [[ShoppeDetailViewController alloc] initWithNibName:@"ShoppeDetailViewController" bundle:nil];
PDLocation *pdLocationPhone = [self.locations objectAtIndex:indexPath.row];
detailViewController.phone = pdLocationPhone.telephone;
detailViewController.callMe = pdLocationPhone.callMe;
[self.navigationController pushViewController:detailViewController animated:YES];
PDLocation *pdLocation = [self.locations objectAtIndex:indexPath.row];
detailViewController.shoppeLabel.text = pdLocation.name;
detailViewController.addressLabel.text = pdLocation.description;
CLLocation *location = [[CLLocation alloc] initWithLatitude:pdLocation.location.latitude longitude:pdLocation.location.longitude];
CLLocationDistance distance = [_userLocation distanceFromLocation:location];
if (distance < 0.1) {
detailViewController.distanceLabel.text = [NSString stringWithFormat:@"Bienvenido"];
} else {
[detailViewController.distanceLabel setText:[NSString stringWithFormat:@"Estás a %.01f Km", distance/1000]];
}
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
我无法在iOS 7中运行任何想法?
谢谢!
这是XIB文件
答案 0 :(得分:0)
检查标签backgroundColor
和textColor
。似乎这是一个颜色问题。