public static UIRefreshControlDelayed InjectRefreshControl(this UITableViewController tableViewController, EventHandler handler) { return(CoreUtility.ExecuteFunction("InjectRefreshControl", delegate() { UIRefreshControlDelayed refreshControl = new UIRefreshControlDelayed(); refreshControl.ScrollView = tableViewController.TableView; refreshControl.AddTarget(handler, UIControlEvent.ValueChanged); tableViewController.RefreshControl = refreshControl; return refreshControl; })); }
public static UIRefreshControl InjectRefreshControl(this UIViewController viewController, UICollectionView collectionView, EventHandler handler) { return(CoreUtility.ExecuteFunction("InjectRefreshControl", delegate() { UIRefreshControlDelayed refreshControl = new UIRefreshControlDelayed(); refreshControl.ScrollView = collectionView; refreshControl.AddTarget(handler, UIControlEvent.ValueChanged); collectionView.AddSubview(refreshControl); collectionView.AlwaysBounceVertical = true; return refreshControl; })); }
public static UIRefreshControlDelayed InjectRefreshControl(this UIViewController viewController, UITableView tableView, EventHandler handler) { return(CoreUtility.ExecuteFunction("InjectRefreshControl", delegate() { UITableViewController tableViewController = new UITableViewController(); viewController.AddChildViewController(tableViewController); tableViewController.TableView = tableView; UIRefreshControlDelayed refreshControl = new UIRefreshControlDelayed(); refreshControl.ScrollView = tableView; refreshControl.AddTarget(handler, UIControlEvent.ValueChanged); tableViewController.RefreshControl = refreshControl; refreshControl.TintColor = UIColor.Black; refreshControl.TintColorDidChange(); return refreshControl; })); }