【发布时间】:2016-07-08 23:15:03
【问题描述】:
我目前有一个 CollectionViewController,通过单击单元格将显示详细视图控制器 (TableViewController)。
模态显示 TableVC 的代码:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController *detailVC = [storyboard instantiateViewControllerWithIdentifier:@"DetailTimetableViewController"];
[self presentViewController:detailVC animated:true completion:nil];
上面的代码一切正常,表格视图控制器以模态方式呈现,并且滚动行为正常。
但是,我遵循了本教程 (http://blog.matthewcheok.com/design-teardown-preview-expanding-cells/),它创建了一个自定义 UIViewControllerAnimatedTransitioning,本教程中的所有内容都可以正常工作。
模态显示 TableVC 的代码(带有自定义动画):
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController *detailVC = [storyboard instantiateViewControllerWithIdentifier:@"DetailTimetableViewController"];
ExpandingCellTransition *transition = [[ExpandingCellTransition alloc]init];
detailVC.transitioningDelegate = transition;
[self presentViewController:detailVC animated:true completion:nil];
但是,除了 TableViewController 出现时,一切正常,它不允许滚动到底部,并且被限制在特定高度。
我已经尝试搜索类似的问题(TableViewController 无法滚动到底部),并尝试应用他们的解决方案,但都不起作用,我相信问题的原因来自自定义转换委托。
【问题讨论】:
-
在情节提要中检查表视图控制器约束
-
我尝试在 Table View Controller 上添加约束,但无法这样做,约束表单为空白。与 (stackoverflow.com/questions/21182226/…) 的情况相同。无论如何谢谢:D
标签: ios xcode tableview presentviewcontroller