Created
May 20, 2015 07:10
-
-
Save alexeystrakh/fdc3da5746027272a179 to your computer and use it in GitHub Desktop.
#ios #xamarin Disable Button Tap Lag in UITableView controls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class TableViewHelper | |
{ | |
public static void DisableButtonTapLag(this UITableView target) | |
{ | |
if (target == null) | |
return; | |
//http://stackoverflow.com/questions/19256996/uibutton-not-showing-highlight-on-tap-in-ios7 | |
target.DelaysContentTouches = false; | |
foreach (UIView currentView in target.Subviews) | |
{ | |
var uIScrollView = currentView as UIScrollView; | |
if (uIScrollView != null) | |
uIScrollView.DelaysContentTouches = false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment