简体   繁体   English

如何在ViewController Swift上修复PageMenu

[英]How to fix PageMenu on ViewController Swift

I use PageMenu . 我使用PageMenu I need fix menu with constraints by height. 我需要按高度限制的修复菜单。 How to do this? 这个怎么做? I know how to fix height of menu, no need answers about this. 我知道如何修复菜单的高度,不需要回答这个问题。 This problems with constraints AutoLayout. 这个问题与约束AutoLayout有关。 I need fix PageMenu on my ViewController. 我需要在ViewController上修复PageMenu。 And app must work on different devices. 应用必须在不同的设备上工作。 I try change Y value. 我尝试改变Y值。 but not work how I need. 但不是我需要的工作。

pageMenu = CAPSPageMenu(viewControllers: controllerArray, frame: CGRectMake(0.0, 240.0, self.view.frame.width, self.view.frame.height), pageMenuOptions: parameters)

I fixed it by fixing my top view height equals 250, and fix all elements by constraints. 我修复了我的顶视图高度等于250,并通过约束修复所有元素。

And when I write this code bottom view fixed how I need. 当我编写此代码时,底部视图修复了我的需求。

pageMenu = CAPSPageMenu(viewControllers: controllerArray, frame: CGRectMake(0.0, 250.0, self.view.frame.width, self.view.frame.height), pageMenuOptions: parameters)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM