Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
部分高亮显示uitableviewcell-iOS 8_Ios_Objective C_Uitableview - Fatal编程技术网

部分高亮显示uitableviewcell-iOS 8

部分高亮显示uitableviewcell-iOS 8,ios,objective-c,uitableview,Ios,Objective C,Uitableview,我有一个自定义的uitableviewcell,它在iOS 8上运行时表现不同。它在iOS 7上运行完全正常。单元格在选择时部分高亮显示。下面是在iOS 8上运行的屏幕截图: 处理iOS 7和8案例的代码如下: #pragma mark - UITableViewDelegate - (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath {

我有一个自定义的uitableviewcell,它在iOS 8上运行时表现不同。它在iOS 7上运行完全正常。单元格在选择时部分高亮显示。下面是在iOS 8上运行的屏幕截图:

处理iOS 7和8案例的代码如下:

 #pragma mark - UITableViewDelegate
 - (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath {
      return UITableViewAutomaticDimension;
 }

 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
   if ([tableView respondsToSelector:@selector(setLayoutMargins:)]) {
       return UITableViewAutomaticDimension;
   } else {
      return [self heightForCellAtIndexPath:indexPath];
   }
}

问题可能不是高度,你的单元格是多少?你的自定义单元格如何?你是使用SDK 7还是SDK 8来构建项目?屏幕截图是来自真实设备还是模拟器?如何在选择时突出显示您的手机?