IOS Scrollview detect Scrolling?

Up vote 0 down vote favorite share g+ share fb share tw.

I have read all the previous posts about this exact topic, but I still cannot detect when the user is scrolling on this iPad app... My . H: #import @interface MyApp_ViewController : UIViewController { } @property (weak, nonatomic) IBOutlet UIButton *otherButton; @property (weak, nonatomic) IBOutlet UIScrollView *otherScrollView; @property (weak, nonatomic) IBOutlet UITextView *txtViewHTML; -(void)k_RootViewPrint:(NSString *) data; -(void)ActionEventForButton: (id) sender; @end my . M: -(void)scrollViewDidScroll:(UIScrollView *)scrollView { NSLog(@"..."); } - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { NSLog(@"2222"); } - (void) touchesEnded: (NSSet *) touches withEvent: (UIEvent *) event { NSLog(@"touches ended BS"); } But none of them work?

I'm sure it's something simple, but I've done everything I can think of and still nothing. Any guidance in the correct direction would be deeply appreciated! Iphone ios ipad uiscrollview link|improve this question edited Jan 31 at 10:13JOM1,5301134 asked Jan 16 at 6:28Calderon173 43% accept rate.

You have to set otherScrollView's delegate to your file owner – Cocoa Matters Jan 16 at 6:34.

Ok, all that was needed was to set the delegate. Thank you. I knew it would be simple – Calderon Jan 16 at 15:02.

If it's not logging in scrollViewDidScroll:, then the scroll view's delegate is not set to the view controller. You can check this in the debugger. After your app has launched, pause in the debugger and run this command: po (id)UIApp keyWindow recursiveDescription Look through the output to find the address of your UIScrollView.

There will be a line that says something like . Take the address (0xc894d60 in my example) and use it in this debugger command: po 0xc894d60 delegate If it prints something like , your delegate is set correctly. If it prints "Can't print the description of a NIL object.

", you have not set the scroll view's delegate. If it prints something else, you have set the scroll view's delegate incorrectly.

Here's the solution in code (for others who might be lost like I was): - (void)viewDidLoad { super viewDidLoad; self.otherScrollView. Delegate = self; // This is the KEY – Calderon Jan 16 at 15:03.

Check whether you have set the delegate or not and then try Try implementing ` - (void) touchesEnded: (NSSet *) touches withEvent: (UIEvent *) event { // If not dragging, send event to next responder if (!self. Dragging) self. NextResponder touchesEnded: touches withEvent:event; else super touchesEnded: touches withEvent: event; }.

For others who might be lost like I was, here's the solution in code: - (void)viewDidLoad { super viewDidLoad; self.otherScrollView. Delegate = self; // This is the KEY.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions