Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.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
Ios 细节视图的问题_Ios_Xcode_View_Interface_Autolayout - Fatal编程技术网

Ios 细节视图的问题

Ios 细节视图的问题,ios,xcode,view,interface,autolayout,Ios,Xcode,View,Interface,Autolayout,我正在尝试构建iOS应用程序的界面。从新项目一次又一次地开始,我仍然会遇到细节视图控件的问题(见图) 这里是我的截图: 当用户触摸UITableView行时显示详细视图。你可以在模拟器屏幕上看到我的设计和最终结果之间的差异——这就是问题所在 主要xib设计 以下是打开详图视图的方式: -这就是我设计中的错误来源。我刚刚关闭了细节xib,现在所有控制都在正确的位置 谢谢Rob设计看起来不错,代码也不错。查看详细信息视图的约束或关闭新的IB格式。您可能希望在屏幕演示完成后的某个位置在应用程序中设

我正在尝试构建iOS应用程序的界面。从新项目一次又一次地开始,我仍然会遇到细节视图控件的问题(见图)

这里是我的截图:

当用户触摸UITableView行时显示详细视图。你可以在模拟器屏幕上看到我的设计和最终结果之间的差异——这就是问题所在

主要xib设计

以下是打开详图视图的方式:

-这就是我设计中的错误来源。我刚刚关闭了细节xib,现在所有控制都在正确的位置


谢谢Rob

设计看起来不错,代码也不错。查看详细信息视图的约束或关闭新的IB格式。您可能希望在屏幕演示完成后的某个位置在应用程序中设置断点,然后在调试器中键入
po[[UIWindow keyWindow]recursiveDescription]
,这将告诉您发生了什么(例如,是标签弄乱了,还是它们的superview)。此外,您是否使用自动布局?如果是,应检查约束。自动布局-这是我设计中的错误源。我刚刚在细节xib上关闭了它,现在所有控件都在正确的位置。
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    // Navigation logic may go here. Create and push another view controller.

     DetailViewController *detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil];

     // ...
     // Pass the selected object to the new view controller.
     [self.navigationController pushViewController:detailViewController animated:YES];

}