Class ReactiveTableViewSource<TSource>
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
ReactiveTableViewSource is a Table View Source that is connected to a List that automatically updates the View based on the contents of the list. The collection changes are buffered and View items are animated in and out as items are added.
public class ReactiveTableViewSource<TSource> : UITableViewSource, IReactiveNotifyPropertyChanged<ReactiveTableViewSource<TSource>>, IHandleObservableErrors, IReactiveObject, INotifyPropertyChanged, INotifyPropertyChanging, IEnableLogger
Type Parameters
TSource
The source type.
- Inheritance
-
ReactiveTableViewSource<TSource>
- Implements
- Extension Methods
Constructors
ReactiveTableViewSource(UITableView)
Initializes a new instance of the ReactiveTableViewSource<TSource> class.
public ReactiveTableViewSource(UITableView tableView)
Parameters
tableView
UITableViewThe table view.
ReactiveTableViewSource(UITableView, IReadOnlyList<TableSectionInformation<TSource>>)
Initializes a new instance of the ReactiveTableViewSource<TSource> class.
public ReactiveTableViewSource(UITableView tableView, IReadOnlyList<TableSectionInformation<TSource>> sectionInformation)
Parameters
tableView
UITableViewThe table view.
sectionInformation
IReadOnlyList<TableSectionInformation<TSource>>A read only list of table section information.
ReactiveTableViewSource(UITableView, INotifyCollectionChanged, NSString, float, Action<UITableViewCell>?)
Initializes a new instance of the ReactiveTableViewSource<TSource> class.
public ReactiveTableViewSource(UITableView tableView, INotifyCollectionChanged collection, NSString cellKey, float sizeHint, Action<UITableViewCell>? initializeCellAction = null)
Parameters
tableView
UITableViewThe table view.
collection
INotifyCollectionChangedThe collection.
cellKey
NSStringThe cell key.
sizeHint
floatThe size hint.
initializeCellAction
Action<UITableViewCell>The initialize cell action.
Properties
Changed
Gets an Observable that fires after a property has changed. Note that this should not fire duplicate change notifications if a property is set to the same value multiple times.
public IObservable<IReactivePropertyChangedEventArgs<ReactiveTableViewSource<TSource>>> Changed { get; }
Property Value
Changing
Gets an observable that fires before a property is about to be changed. Note that this should not fire duplicate change notifications if a property is set to the same value multiple times.
public IObservable<IReactivePropertyChangedEventArgs<ReactiveTableViewSource<TSource>>> Changing { get; }
Property Value
Data
Gets or sets the data that should be displayed by this ReactiveTableViewSource<TSource>. You should probably bind your view model to this property.
public IReadOnlyList<TableSectionInformation<TSource>> Data { get; set; }
Property Value
- IReadOnlyList<TableSectionInformation<TSource>>
The data.
DeleteRowsAnimation
Gets or sets the row animation to use when UITableView.DeleteRows is invoked.
public UITableViewRowAnimation DeleteRowsAnimation { get; set; }
Property Value
- UITableViewRowAnimation
DeleteSectionsAnimation
Gets or sets the row animation to use when UITableView.DeleteSections is invoked.
public UITableViewRowAnimation DeleteSectionsAnimation { get; set; }
Property Value
- UITableViewRowAnimation
ElementSelected
Gets an IObservable that is a hook to RowSelected(UITableView, NSIndexPath) calls.
public IObservable<object?> ElementSelected { get; }
Property Value
InsertRowsAnimation
Gets or sets the row animation to use when UITableView.InsertRows is invoked.
public UITableViewRowAnimation InsertRowsAnimation { get; set; }
Property Value
- UITableViewRowAnimation
InsertSectionsAnimation
Gets or sets the row animation to use when UITableView.InsertSections is invoked.
public UITableViewRowAnimation InsertSectionsAnimation { get; set; }
Property Value
- UITableViewRowAnimation
ReloadRowsAnimation
Gets or sets the row animation to use when UITableView.ReloadRows is invoked.
public UITableViewRowAnimation ReloadRowsAnimation { get; set; }
Property Value
- UITableViewRowAnimation
ReloadSectionsAnimation
Gets or sets the row animation to use when UITableView.ReloadSections is invoked.
public UITableViewRowAnimation ReloadSectionsAnimation { get; set; }
Property Value
- UITableViewRowAnimation
ThrownExceptions
Gets a observable which will fire whenever an exception would normally terminate ReactiveUI internal state.
public IObservable<Exception> ThrownExceptions { get; }
Property Value
Methods
CanEditRow(UITableView, NSIndexPath)
public override bool CanEditRow(UITableView tableView, NSIndexPath indexPath)
Parameters
tableView
UITableViewindexPath
NSIndexPath
Returns
CanMoveRow(UITableView, NSIndexPath)
public override bool CanMoveRow(UITableView tableView, NSIndexPath indexPath)
Parameters
tableView
UITableViewindexPath
NSIndexPath
Returns
Dispose(bool)
protected override void Dispose(bool disposing)
Parameters
disposing
bool
GetCell(UITableView, NSIndexPath)
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
Parameters
tableView
UITableViewindexPath
NSIndexPath
Returns
- UITableViewCell
GetHeightForFooter(UITableView, nint)
public override nfloat GetHeightForFooter(UITableView tableView, nint section)
Parameters
tableView
UITableViewsection
nint
Returns
- nfloat
GetHeightForHeader(UITableView, nint)
public override nfloat GetHeightForHeader(UITableView tableView, nint section)
Parameters
tableView
UITableViewsection
nint
Returns
- nfloat
GetHeightForRow(UITableView, NSIndexPath)
public override nfloat GetHeightForRow(UITableView tableView, NSIndexPath indexPath)
Parameters
tableView
UITableViewindexPath
NSIndexPath
Returns
- nfloat
GetViewForFooter(UITableView, nint)
public override UIView GetViewForFooter(UITableView tableView, nint section)
Parameters
tableView
UITableViewsection
nint
Returns
- UIView
GetViewForHeader(UITableView, nint)
public override UIView GetViewForHeader(UITableView tableView, nint section)
Parameters
tableView
UITableViewsection
nint
Returns
- UIView
ItemAt(NSIndexPath)
Items at.
public object? ItemAt(NSIndexPath indexPath)
Parameters
indexPath
NSIndexPathThe index path.
Returns
- object
The item.
NumberOfSections(UITableView)
public override nint NumberOfSections(UITableView tableView)
Parameters
tableView
UITableView
Returns
- nint
RowSelected(UITableView, NSIndexPath)
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
Parameters
tableView
UITableViewindexPath
NSIndexPath
RowsInSection(UITableView, nint)
public override nint RowsInSection(UITableView tableview, nint section)
Parameters
tableview
UITableViewsection
nint
Returns
- nint
SuppressChangeNotifications()
When this method is called, an object will not fire change notifications (neither traditional nor Observable notifications) until the return value is disposed.
public IDisposable SuppressChangeNotifications()
Returns
- IDisposable
An object that, when disposed, re-enables change notifications.
TitleForFooter(UITableView, nint)
public override string TitleForFooter(UITableView tableView, nint section)
Parameters
tableView
UITableViewsection
nint
Returns
TitleForHeader(UITableView, nint)
public override string TitleForHeader(UITableView tableView, nint section)
Parameters
tableView
UITableViewsection
nint
Returns
Events
PropertyChanged
public event PropertyChangedEventHandler? PropertyChanged
Event Type
PropertyChanging
public event PropertyChangingEventHandler? PropertyChanging