I have many uiimageviews in a uiscrollview. I am trying to drag an uiimageview out of the uiscrollview. I have subclasssed uiscollview and have written custon touchbegan,toucmoved and touchended methods to pass the touch to scrollview superclass on scroll-drag event and to my main viewcontroller class touchmethods on events other than scroll -events. To drag uiimageview out of uiscrollview I am removing that from its superview(scrollview) and adding it to mainview on touchbegan method. my uiimageview is removed from scrollview and is added to mainview succesfully . Now the problem here is : on the first touch ,my touchbegan method is called but touchmoved method is not called when i move the uiimageview. on the second touch onwards everything works n the uiimageview is dragged out the scrollview
Update: I subclassed UIImageView class and wrote the touchbegan,touchmoved and touchended methods inside the uiimageview subclass and now it is working.Previously I was using touch methods of the mainview ,So touch-methods were also considering touch on the UIScollview .But now only touches on uiimageviews are considered. I also added one more change: I disabled scrolling at touchbegan and enabled it at touchend . Thanx