3
我有下面的代碼,我添加UITapGestureRecognizer我的看法:UIButtons UITapGestureRecognizer後,將無法正常工作添加
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(userTapped)];
[self.view addGestureRecognizer:tap];
我的問題是,當我按其它UIButton
S(按鈕是在IB創建)與UITapGestureRecognizer
的觀點相同,沒有任何反應。
我想我只向gestureRecognizer添加一個動作(userTapped :),但是如何添加與創建的其他按鈕的交互?
我的想法是未來:我需要創建一些backgroundVIew,並在其中添加GestureRecognizer – ignotusverum 2012-04-21 16:16:50