ios - Enable dragging for only one uitableviewcell -
i've got uitableviewcontroller
has custom uitableviewcell
. cell has got uiscrollview
, , on dragging shows hidden buttons.
everything works perfectly, disables uitableview
scroll while dragging, unfortunately can't disable multi-dragging (if utilize 2 or more fingers on more cells drags these cells).
i solved assigning tag every scroll view , adding 2 functions which:
1 function: disable scrolling of every scroll id different 1 scrolling.
code:
func disablescrolling(tag:int){ var = 0; < count cells; ++i{ if(i != tag){ var scroll:uiscrollview? = self.view.viewwithtag(i) as? uiscrollview scroll!.scrollenabled =false } } }
in other function enables scrolling of every uiscrollview.
then phone call these functions in uiscrollview delegate methods
ios objective-c uitableview swift
No comments:
Post a Comment