public static void SetContent(this UITableView view, IUITableViewDataSource adapter) { view.DataSource = adapter; if (view.WeakDelegate == null && adapter is NSObject) { view.WeakDelegate = (NSObject)adapter; } }
public static void SetContent(this IQView <UITableView> view, IUITableViewDataSource adapter) { view.PlatformView.SetContent(adapter); }
public static UITableView CreateTableView(this UIViewController viewController, IUITableViewDataSource tableViewDatasource = null, IUITableViewDelegate tableViewDelegate = null) { var tableView = new UITableView(); viewController.View.AddSubview(tableView); tableView.AddConstraintsToFillSuperview(); tableView.DataSource = tableViewDatasource ?? viewController as IUITableViewDataSource; tableView.Delegate = tableViewDelegate ?? viewController as IUITableViewDelegate; return(tableView); }