当前位置:网站首页>MMDrawerController第一次加载侧边栏高度问题
MMDrawerController第一次加载侧边栏高度问题
2022-07-21 17:39:00 【沐梓弦乐】
引言:当在CenterControl侧滑进入侧边栏 第一次加载侧边栏高度不对 因为我的侧边栏是添加导航栏的 高度会有个先升后恢复到初始的事情 只有App启动是每一次的第一次点击按钮进行侧滑才会出现这个问题 但是当侧滑加上动画时就不出现这个问题
测试: iPhoneSE2代 第一次加载侧边栏高度为623 非第一次启动603(正常)
iPhone11 第一次加载侧边栏高度为852 非第一次启动808(正常)
解决方案以及侧滑代码
HomeViewController *home = [[HomeViewController alloc]init];
LeftMenuController *left = [[LeftMenuController alloc]init];
UINavigationController *centerNvaVC = [[UINavigationController alloc]initWithRootViewController:home];
UINavigationController *leftNavVC = [[UINavigationController alloc]initWithRootViewController:left];
self.drawerController = [[MMDrawerController alloc] initWithCenterViewController:centerNvaVC leftDrawerViewController:leftNavVC];
[self.drawerController setShowsShadow:NO];
//4、设置打开/关闭抽屉的手势
self.drawerController.openDrawerGestureModeMask = MMOpenDrawerGestureModeNone;
self.drawerController.closeDrawerGestureModeMask = MMCloseDrawerGestureModeNone;
//5、设置左右两边抽屉显示的多少
self.drawerController.maximumLeftDrawerWidth = KScreenW;
//我是在这里面解决问题的
[self.drawerController bouncePreviewForDrawerSide:(MMDrawerSideLeft) completion:nil];
[self.window setRootViewController:self.drawerController];
进入我上面写的方法 把645-660的动画代码屏蔽就好了 调用屏蔽代码上的两个方法应该也是可以的
边栏推荐
- 管道,重定向以及正则表达式
- ASP. Net core deployment Manual: 2 Hyper-V virtual machine
- Update the version number and static resources (the storage address of the embedded web page)
- Visual Studio的intellisense: '没有可用的成员'
- openlayers 使用canvas绘制圆形头像图标
- Pointer depth solution "three" (array cognition)
- C#异常处理 | 连接成功但登陆异常/管道另一端上无任何进程Error: A connection was successfully established with the server, but
- 多线程常用类
- 海思Hi3531||瑞芯微RK1109用rtsp服务器实现h264推流
- 基于[海思Hi3516dv300]开发的内核定时器中断
猜你喜欢
随机推荐
OSPF 重发布
Using OpenGL texture array to realize high-precision real-time LUT filter
STM32-f40x FSMC信号配置并点亮LCD屏
Must use destructuring props assignmenteslint
三星6818LED驱动的编写
NodeJS使用Express框架进行POST请求报“BadRequestError:request aborted”
Depth solution of pointer "seven" (related knowledge of function pointer)
[compilation record of Ruixin micro rk1109_rk1126 rkmedia]
Let me understand your MySQL storage engine
海思[Hi3531]onvif协议实现基于gsoap和openssl_代码篇
Hisilicon hi3531 | Ruixin micro rk1109 realizes H264 streaming with RTSP client
Update the version number and static resources (the storage address of the embedded web page)
Differences between runtime+compiler and runtime only versions
Is the computing power of human brain really weak
Samsung 6818 water lamp program based on uboot
Writing of Samsung 6818led driver
新手股票开户安全吗?网上可以办理吗?
Custom picture crop box
多线程常用类
Rk3288 detailed explanation of LVDS signal configuration and 1080p video signal