iOS Swift:呈现imagePicker后SlidingMenuView位置错误

编程入门 行业动态 更新时间:2024-10-26 17:18:49
本文介绍了iOS Swift:呈现imagePicker后SlidingMenuView位置错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我在 TabBar 控制器和导航控制器的项目中使用 PageMenu.当我初始化滚动菜单"时,我使用它在状态栏和导航栏下显示它:

I am using PageMenu in my project within a TabBar Controller and a Navigation Controller. When I initialize the "Scrolling menu" I use this to display it under the statusBar and the navigation bar :

pageMenu = CAPSPageMenu(viewControllers: controllerArray, frame: CGRectMake(0, UIApplication.sharedApplication().statusBarFrame.size.height + self.navigationController!.navigationBar.frame.height, self.view.frame.width, self.view.frame.height), options: parameters)

此解决方案运行良好,可在我想要的位置准确显示我的菜单!然后我在其中一个滚动视图中呈现一个图像选择器视图.关闭后,菜单回到初始位置(导航栏下)...

This solution is working perfectly and display my menu exactly where I want ! Then I present an image picker view inside one of the scrolling view. After dismissing it, the menu goes back to the initial place (under the navigation bar)...

有什么解决方案可以避免这个问题?(如果您需要更多详细信息,我可以提供更多代码)

Any solution to avoid this issue ? (If you need more detail I can provide more code)

附言我的母语不是英语,所以我希望我的问题可以理解:)

P.S. I'm not a native English speaker so I hope my question is understandable :)

推荐答案

添加viewcontrollerpageMenu"作为父控制器的子级,问题解决

Added the viewcontroller "pageMenu" as a child of the parent controller and the problem was solved

这篇关于iOS Swift:呈现imagePicker后SlidingMenuView位置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-29 03:51:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1183989.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   位置   Swift   iOS   SlidingMenuView

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!