查看容器视图中的表/集合在半透明选项卡栏

时间:2016-05-01 07:19:55

标签: xamarin xamarin.ios autolayout interface-builder

我的根视图控制器上有一个容器视图,其自动布局限制为

enter image description here Root View Controller

我在

的容器视图中添加了一个视图控制器
AddChildViewController(toViewController);
ContainerView.AddSubview(toViewController.View);
toViewController.View.LayoutIfNeeded();

UIView.Animate(0.5, () =>
{
   toViewController.View.Frame = new CoreGraphics.CGRect(0, 0, ContainerView.Frame.Width, ContainerView.Frame.Height);
   toViewController.View.LayoutIfNeeded();

}, () =>
{
   toViewController.DidMoveToParentViewController(this);
});

Child View Controller

顺便说一下,“Label”下面是CollectionView。 我想要发生的是这样的。

enter image description here

上面图片的根视图控制器是UITableViewController,完美地显示它背后有一个内容。但是在容器视图上添加了UICollection视图的情况。它只是这样显示。

enter image description here

任何信息将不胜感激。谢谢。

1 个答案:

答案 0 :(得分:3)

约束memcpy是导致此问题的约束。

在您的CardCollection视图xib文件中,让您在父视图上进行以下设置:

enter image description here

通过按住Ctrl键单击并向上拖动到父视图来设置底部约束以查看:

enter image description here

如果您持有alt,您将获得以下选项:

enter image description here

然后只需确保容器视图超过标签栏,如下所示:

enter image description here

相关问题