ios - Some help regarding UIScrollView and changing ownership of a UIView -
basically, i'm working on app on ipad involves line user can scroll horizontally through on screen. it's set there uiscrollview , uiview on top uses drawrect. have uiview that's ball can move around via touch, , detects when within uiscrollview , when on line painted in uiview.
here's main problem, though. both uiscrollview , ball subviews same view controller, , want make that, when ball dragged uiscrollview, scroll along , disappear if need be. how should this? should make ball subview of uiscrollview when happens, or should other way?
use container view. put ball in transparent container subview , view moves around ( taking ball it). when want scroll view or line move ball, insert them container @ position 0 (under ball).
Comments
Post a Comment