Skip to content

Commit 01e8645

Browse files
Todd Bermananaisbetts
authored andcommitted
Add an ItemAt method to get the object at the indexPath
1 parent 8370907 commit 01e8645

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

ReactiveUI.Platforms/Cocoa/ReactiveCollectionViewSource.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ public override void ItemSelected(UICollectionView collectionView, NSIndexPath i
135135
elementSelected.OnNext(commonSource.ItemAt(indexPath));
136136
}
137137

138+
public object ItemAt(NSIndexPath indexPath)
139+
{
140+
return commonSource.ItemAt(indexPath);
141+
}
142+
138143
protected override void Dispose(bool disposing)
139144
{
140145
if (disposing) commonSource.Dispose();

ReactiveUI.Platforms/Cocoa/ReactiveTableViewSource.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,10 @@ public override UIView GetViewForFooter(UITableView tableView, int section)
224224
return footer == null ? null : footer.View.Invoke();
225225
}
226226

227-
227+
public object ItemAt(NSIndexPath indexPath)
228+
{
229+
return commonSource.ItemAt(indexPath);
230+
}
228231

229232
// Boring copy-paste of ReactiveObject et al follows:
230233
[field:IgnoreDataMember]

0 commit comments

Comments
 (0)