ios - How can I redirect pan gesture events to parent views? -
ios - How can I redirect pan gesture events to parent views? -
i have uiscrollview
within sliding uiview
. sliding uiview
should able reach top of navigation bar, , if user still dragging finger, uiscrollview
within should start slide upwards well. likewise, if slide uiscrollview
downwards , reach top of content, sliding uiview
should start slide down.
i can't behavior work way want to. using xamarin.ios library, can translate objective-c c# if can point me in right direction this.
thanks!
you able custom delegate , utilize of scrollviewdidscroll:
method.
in method check see if have reached bounds of uiscrollview... if have pass whatever variables need to delegate (which uiview) , uiview handle info in way want.
example:
uiview.m
[self.myscrollview setscrolldelegate:self];
scrollview.h
@protocol scrollviewdelegate : <nsobject> @optional - (void)scrollviewdidscrolltoend:(needed parameters here); @end
scrollview.m
- (void)scrollviewdidscroll:(uiscrollview *)scrollview { if ( [has reached end of content] ) { // here want pass scrolling position delegate if (!!scrollviewdelegate && [scrollviewdelegate respondstoselector:@selector(scrollviewdidscrolltoend:)]) { [scrollviewdelegate scrollviewdidscrolltoend:(needed parameters here)]; } } }
ios xamarin
Comments
Post a Comment