Jia Song

Results 24 comments of Jia Song

另外,在scannerLineMove方法中toValue应该是 this.props.rectHeight - this.props.scanBarHeight. hintText位置在各个机型上没有适配

+1 同时希望能够封装上传进度的接口。

> 你可以尝试关闭动画, 通过调用`setAnimationDisabled` setAnimationDisabled后没有问题,但是没有动画很突兀,不如开启isCollectionViewAnimationBug的效果

如上图所示,setTabBarStyle判断了前后值是否相等,首次设置时,_tabBarStyle与将要设置的tabBarStyle都是UIBarStyleDefault,对应的样式是`UIBlurEffectStyleSystemChromeMaterialLight`,但是此时系统是`UIBlurEffectStyleSystemChromeMaterial`,所以就产生了以上的问题

> 目前 QMUICommonDefines.h 里的宏定义 `NavigationBarHeight` 在这种情况下是错误的,后续修复。 > 看到你的示例代码里貌似是在 UIViewController 里,那应该用 `UIViewController(QMUI).qmui_navigationBarMaxYInViewCoordinator` 更合理? `UIViewController(QMUI).qmui_navigationBarMaxYInViewCoordinator`建议在`viewDidLayoutSubviews、viewWillAppear`里使用,我是在`initSubviews`里用Masonry布局,用此方法的话还需要在`viewDidLayoutSubviews`里再更新一下约束。我们目前业务上也不用适配横屏,所以导航栏高度在此页面中基本是不会变的,所以也无须更新约束,用静态常量值更合适一些。

在这种modal的情况下,可以手势下拉dismiss,此时`- (BOOL)shouldPopViewControllerByBackButtonOrPopGesture:(BOOL)byPopGesture`不起作用,因为此方法只处理了push情况下的手势和返回按钮,建议实现`UIAdaptivePresentationControllerDelegate`的`- (void)presentationControllerDidAttemptToDismiss:(UIPresentationController *)presentationController`,`- (BOOL)presentationControllerShouldDismiss:(UIPresentationController *)presentationController`等方法来适配此类情况。

记录一下当`self.interactivePopGestureRecognizer.enabled = NO`时,需要开发者自行实现的方法: 1、「非必须」`UINavigationController+QMUI.m`中`- (BOOL)shouldForceEnableInteractivePopGestureRecognizer` 也就是`forceEnableInteractivePopGestureRecognizer`, 不过,既然开发者自行实现了pop手势,这个方法就失去了其意义 2、「必须」`UINavigationController+QMUI.m`中`- (BOOL)canPopViewController:(UIViewController *)viewController byPopGesture:(BOOL)byPopGesture` 也就是`shouldPopViewControllerByBackButtonOrPopGesture`,需要开发者在`- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer`手势代理中实现 3、「必须」`QMUINavigationController.m`中`[self.interactivePopGestureRecognizer addTarget:self action:@selector(handleInteractivePopGestureRecognizer:)];` 需要开发者给自己的pop手势添加`Target-Action`,实现`- (void)handleInteractivePopGestureRecognizer:(UIScreenEdgePanGestureRecognizer *)gestureRecognizer` 另外建议`- (void)navigationController:(nonnull QMUINavigationController *)navigationController poppingByInteractiveGestureRecognizer:(nullable UIScreenEdgePanGestureRecognizer *)gestureRecognizer viewControllerWillDisappear:(nullable UIViewController *)viewControllerWillDisappear...