如何检测用户何时单击Uber Button(UBSDKRideRequestButton)

时间:2016-11-18 02:27:33

标签: uber-api

无论如何检测用户是否点击了超级按钮?

// initialize uber request button
if (!_rideRequestButton) {
    _rideRequestButton = [[UBSDKRideRequestButton alloc] initWithClient:self.ridesClient];
    _rideRequestButton.delegate = self;

}

enter image description here

2 个答案:

答案 0 :(得分:2)

我发现我可以在按钮上添加目标操作

 [_rideRequestButton addTarget:self
                               action:@selector(rideRequestButtonIsTapped:)
                     forControlEvents:UIControlEventTouchUpInside];

- (void)rideRequestButtonIsTapped:(UBSDKRideRequestButton *)button

这种方法也是uber推荐的:

https://github.com/uber/rides-ios-sdk/issues/66

答案 1 :(得分:0)