iphone - Why can I not receive touch events within my custom UIScrollView subclass? -


I have a UIIL view with the UIM view. I have uiscrollview subclass, but I can not get touch to touch work is not said. What should I do to call Iuitouch?

What's wrong?

.h

  #import & lt; UIKit / UIKit.h & gt; @ Interface myScrollView: UIScrollView {} @end  

.m

  #import "myScrollView.h" @implementation myScrollView - (zero) touches the brinjal: (NSSet *) touches the event: (UIEvent *) event {UITouch * touch = [[Event All Tables] Any Object]; CGPoint Location = [Touch Location Invoice: touch.view]; If (touch.view.tag> 0) {touch.view.center = location; } NSLog (@ "tag =% @", [NSString stringWithFormat: @ "% i", touch.view.tag]); With the 2.0+ compiler, everything works as expected, but now I have the 3.0+ compiler to use, my UISCLoglance no longer receives touch events. 

I got an answer to the problem here:

Originally, this capability in Apes removed 3.0

2.2.1 In and earlier, it was possible to prevent UIScrollView from scrolling by implementing UIResponder touch methods in a sub-classroom and not calling super class' implementation; this was never supported, and was often the result of an inconsistent state on UIScrollView, But it worked in certain situations


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -