Skip to content

Instantly share code, notes, and snippets.

@felipeslongo
Created March 22, 2019 17:01
Show Gist options
  • Save felipeslongo/adc6e825f64a080a092d18eb168df86c to your computer and use it in GitHub Desktop.
Save felipeslongo/adc6e825f64a080a092d18eb168df86c to your computer and use it in GitHub Desktop.
Xamarin.IOS extension method that performs a click/tap event into a UITableViewCell
namespace UIKit
{
public static class UITableView_SelectCell
{
public static void SelectCell(this UITableView @this, UITableViewCell cell)
{
var index = @this.IndexPathForCell(cell);
@this.SelectRow(index, true, UITableViewScrollPosition.None);
@this.Delegate.RowSelected(@this, index);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment