如何在使用UIPanGestureRecognizer的同一个按钮时访问uibutton

问题描述:

我是ios开发的新手。现在,我正在开发一个带有GestureRecognizer的小应用程序。 在我的应用程序中有一些uibuttons和这个按钮响应UIPanGestureRecognizer。 现在我想确定哪个按钮正在拖动,当应用UIPanGestureRecognizer时。如何在使用UIPanGestureRecognizer的同一个按钮时访问uibutton

如果有人知道。请清除我的问题。

也许这样的事情会为你工作

- (void)pan:(UIPanGestureRecognizer *)gesture 
{ 
    UIButton *button = (UIButton *)gesture.view; 
}