Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 UIScrollView 的子类。这个自定义子类有一个方法应该初始化新 UINavigationController 的打开。我知道子类不处理这种类型的方法,但我将如何以理想的方式处理这种情况?
我认为处理这个问题的理想方法是为您的子类声明一个自定义委托协议方法UIScrollView。然后,您将设置您的UIViewController,我假设它是自定义滚动视图的父级,当它拦截此委托回调时,只需执行一个简单的操作:
UIScrollView
UIViewController
[self.navigationController popViewControllerAnimated:YES];