Class ReactiveTableViewSourceExtensions
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
Extension methods for ReactiveTableViewSource<TSource>.
public static class ReactiveTableViewSourceExtensions : Object
- Inheritance
-
ReactiveTableViewSourceExtensions
Methods
BindTo<TSource, TCell>(IObservable<IReadOnlyList<TableSectionInformation<TSource, TCell>>>, UITableView, Func<ReactiveTableViewSource<TSource>, IDisposable>?)
Extension method that binds an observable of a list of table sections as the source of a UIKit.UITableView.
If your IReadOnlyList<T> is also an instance of INotifyCollectionChanged, then this method will silently update the bindings whenever it changes as well. Otherwise, it will just log a message.
public static IDisposable BindTo<TSource, TCell>(this IObservable<IReadOnlyList<TableSectionInformation<TSource, TCell>>> sectionsObservable, UITableView tableView, Func<ReactiveTableViewSource<TSource>, IDisposable>? initSource = null) where TCell : UITableViewCell
Parameters
sectionsObservable
IObservable<IReadOnlyList<TableSectionInformation<TSource, TCell>>>Sections observable.
tableView
UITableViewTable view.
initSource
Func<ReactiveTableViewSource<TSource>, IDisposable>Optionally initializes some property of the ReactiveTableViewSource<TSource>.
Returns
- IDisposable
The IDisposable used to dispose this binding.
Type Parameters
TSource
The source type.
TCell
Type of the UIKit.UITableViewCell.
BindTo<TSource, TCell>(IObservable<INotifyCollectionChanged>, UITableView, NSString, float, Action<TCell>?, Func<ReactiveTableViewSource<TSource>, IDisposable>?)
Extension method that binds an observable of a collection as the source of a UIKit.UITableView.
public static IDisposable BindTo<TSource, TCell>(this IObservable<INotifyCollectionChanged> sourceObservable, UITableView tableView, NSString cellKey, float sizeHint, Action<TCell>? initializeCellAction = null, Func<ReactiveTableViewSource<TSource>, IDisposable>? initSource = null) where TCell : UITableViewCell
Parameters
sourceObservable
IObservable<INotifyCollectionChanged>Source collection observable.
tableView
UITableViewTable view.
cellKey
NSStringCell key.
sizeHint
floatSize hint.
initializeCellAction
Action<TCell>Initialize cell action.
initSource
Func<ReactiveTableViewSource<TSource>, IDisposable>Optionally initializes some property of the ReactiveTableViewSource<TSource>.
Returns
- IDisposable
The IDisposable used to dispose this binding.
Type Parameters
TSource
The source type.
TCell
Type of the UIKit.UITableViewCell.
BindTo<TSource, TCell>(IObservable<INotifyCollectionChanged>, UITableView, float, Action<TCell>?, Func<ReactiveTableViewSource<TSource>, IDisposable>?)
Extension method that binds an observable of a collection as the source of a UIKit.UITableView. Also registers the given class with an unspecified cellKey (you should probably not specify any other cellKeys).
public static IDisposable BindTo<TSource, TCell>(this IObservable<INotifyCollectionChanged> sourceObservable, UITableView tableView, float sizeHint, Action<TCell>? initializeCellAction = null, Func<ReactiveTableViewSource<TSource>, IDisposable>? initSource = null) where TCell : UITableViewCell
Parameters
sourceObservable
IObservable<INotifyCollectionChanged>Source collection observable.
tableView
UITableViewTable view.
sizeHint
floatSize hint.
initializeCellAction
Action<TCell>Initialize cell action.
initSource
Func<ReactiveTableViewSource<TSource>, IDisposable>Optionally initializes some property of the ReactiveTableViewSource<TSource>.
Returns
- IDisposable
The IDisposable used to dispose this binding.
Type Parameters
TSource
The source type.
TCell
Type of the UIKit.UITableViewCell.