ios - Switch between UIScrollView -
i have 1 uiscrollview embedded in uiscrollview.
i switch first 1 other 1 when user scroll offset.
is there equivalent of [textfield becomefirstresponder], can use? instead of setting scrollview.scrollenabled = no , setting yes.
thanks
one strategy detect when want switch scroll views, animate 1 of them offscreen , other 1 on. example, scrollviewa being used , scrollviewb offscreen. when time comes switch scrollviewb onscreen , scrollviewa offscreen, use uianimation combined scrollingenabled.
- (void)timetoswitchscrollviews { [uiview animatewithduration:5 animations: ^{ self.scrollviewa.frame = cgrectmake(/* somewhere off screen */); self.scrollviewb.frame = cgrectmake(/* somewhere on screen */); } completion: ^(bool finished) { /* wait untill last minute turn of user interaction */ self.scrollviewa.scrollingenabled = no; } }
Comments
Post a Comment