objective c - performSelector:afterdelay never called in scrollViewWillBeginDragging -


User tries to call a method after the delay when starting a scroll view.

This is called the block below, but defined in the verb that defines this demonstration: It is said only when I stop scrollView to drag

  - (zero) viewDidoadload [[Super Viewedload]; UIScrollView * sv = [[UIScrollView alloc] initWithFrame: self.view.frame]; Sv.delegate = self; Sv.backgroundColor = [UIColor redColor]; [SV set content size: CGSizeMake (1000, 200)]; [Self.view addSubview: sv]; } - (zero) scrollViewWillBeginDragging: (UIScrollView *) ScrollView {NSLog (@ "O"); [Self display selector: Object with @Sylector (My Action): After zero: 3]; } - (zero) myAction {NSLog (@ "Calling After Starting 3 Seconds Dragging"); }  

I also tried in an NSTimer and background thread but the problem is the same ...

Any thoughts?

If you still remove callback while dragging, you can schedule it for normal run loop mode Will, like:

  [Self display selector: Object with @alectation: Day after zero: 3 insodes: @ [NSRunLoopCommonModes]];  

He will do the trick :)


Comments