gpt4 book ai didi

ios - 使用 MMDrawerController 检测抽屉何时关闭

转载 作者:可可西里 更新时间:2023-11-01 00:52:27 25 4
gpt4 key购买 nike

有什么方法可以通过拖动中心容器来检测抽屉何时关闭?我希望每次抽屉关闭时执行某些操作..

最佳答案

你可以使用

-(void)setGestureCompletionBlock:(void(^)(MMDrawerController * drawerController, UIGestureRecognizer * gesture))gestureCompletionBlock;

设置回调 block 以在手势完成时得到通知。在此 block 中,查询 drawerController 以了解当前打开的内容。

/**
Sets a callback to be called when a gesture has been completed.

This block is called when a gesture action has been completed. You can query the `openSide` of the `drawerController` to determine what the new state of the drawer is.

@param gestureCompletionBlock A block object to be called that allows the implementer be notified when a gesture action has been completed.
*/

关于ios - 使用 MMDrawerController 检测抽屉何时关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32518879/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com