Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of sideslip gesture return in ios development

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to solve the problem of sideslip gesture return in ios development, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's learn about it!

Sideslip gesture back

IOS's side-slip return gesture has a good operation experience, and applications that do not support side-slip return are definitely not good applications. However, in the process of development, when the return button is customized, or on some pages such as webView,tableView, the sideslip return gesture fails, so we need to set it. You can negotiate the following code in the base class:

If ([self.navigationController respondsToSelector:@selector (interactivePopGestureRecognizer)]) {/ / agents who need to follow the gesture self.navigationController.interactivePopGestureRecognizer.delegate = self; self.navigationController.interactivePopGestureRecognizer.enabled = YES;}

Problem: when returning the top-most Controller of navigationController. Side slide again, at this time you are clicking on the operation of a push page, you will find that Kana, it will take a long time to react.

This is because the Controller gesture is still valid at the top level, but after sliding, the returned page cannot be found. Cause software stutter, fake death, so make this gesture invalid in rootViewController. Set the following to NO

Self.navigationController.interactivePopGestureRecognizer.enabled = YES

Of course, you can also use a third-party library, which is well written. He extends the sideslip return gesture of the system, not from the edge, but to the right. Most importantly, he only needs to join the project and does not need a single line of code to achieve it.

These are all the contents of this article entitled "how to solve the problem of sideslip gesture return in ios development". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report