Question

I have a UIButton whose IBAction has been setup though XIB file. Following is the IBAction method. When I press button multiple times very quickly, this method gets called only once for the last press. I have to wait little more time between the presses. Is there anything like long press time for UIButton that I can reduce or any other settings to make it responding quicker. This button does the similar job of Keyboard's back button to delete last character. I want it to respond very quick like Keyboard's button does. Thanks.

- (IBAction)deleteButtonPress:(id)sender {
    NSLog(@"Click");
    if(self.numpadTextFiled.text.length > 0)
        self.numpadTextFiled.text = [self.numpadTextFiled.text substringToIndex:   [self.numpadTextFiled.text length]-1];
}
Was it helpful?

Solution

Is the button by any chance positioned within a UIScrollView? If so, then touches are delayed?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top