Table of Contents

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
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)

Constructors

ReactiveTableViewSource(UITableView)

Initializes a new instance of the ReactiveTableViewSource<TSource> class.

public ReactiveTableViewSource(UITableView tableView)

Parameters

tableView UITableView

The 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 UITableView

The 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 UITableView

The table view.

collection INotifyCollectionChanged

The collection.

cellKey NSString

The cell key.

sizeHint float

The 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

IObservable<IReactivePropertyChangedEventArgs<ReactiveTableViewSource<TSource>>>

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

IObservable<IReactivePropertyChangedEventArgs<ReactiveTableViewSource<TSource>>>

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

IObservable<object>

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

IObservable<Exception>

Methods

CanEditRow(UITableView, NSIndexPath)

public override bool CanEditRow(UITableView tableView, NSIndexPath indexPath)

Parameters

tableView UITableView
indexPath NSIndexPath

Returns

bool

CanMoveRow(UITableView, NSIndexPath)

public override bool CanMoveRow(UITableView tableView, NSIndexPath indexPath)

Parameters

tableView UITableView
indexPath NSIndexPath

Returns

bool

Dispose(bool)

protected override void Dispose(bool disposing)

Parameters

disposing bool

GetCell(UITableView, NSIndexPath)

public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)

Parameters

tableView UITableView
indexPath NSIndexPath

Returns

UITableViewCell

GetHeightForFooter(UITableView, nint)

public override nfloat GetHeightForFooter(UITableView tableView, nint section)

Parameters

tableView UITableView
section nint

Returns

nfloat

GetHeightForHeader(UITableView, nint)

public override nfloat GetHeightForHeader(UITableView tableView, nint section)

Parameters

tableView UITableView
section nint

Returns

nfloat

GetHeightForRow(UITableView, NSIndexPath)

public override nfloat GetHeightForRow(UITableView tableView, NSIndexPath indexPath)

Parameters

tableView UITableView
indexPath NSIndexPath

Returns

nfloat

GetViewForFooter(UITableView, nint)

public override UIView GetViewForFooter(UITableView tableView, nint section)

Parameters

tableView UITableView
section nint

Returns

UIView

GetViewForHeader(UITableView, nint)

public override UIView GetViewForHeader(UITableView tableView, nint section)

Parameters

tableView UITableView
section nint

Returns

UIView

ItemAt(NSIndexPath)

Items at.

public object? ItemAt(NSIndexPath indexPath)

Parameters

indexPath NSIndexPath

The 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 UITableView
indexPath NSIndexPath

RowsInSection(UITableView, nint)

public override nint RowsInSection(UITableView tableview, nint section)

Parameters

tableview UITableView
section 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 UITableView
section nint

Returns

string

TitleForHeader(UITableView, nint)

public override string TitleForHeader(UITableView tableView, nint section)

Parameters

tableView UITableView
section nint

Returns

string

Events

PropertyChanged

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler

PropertyChanging

public event PropertyChangingEventHandler? PropertyChanging

Event Type

PropertyChangingEventHandler