Adding the iOS photo screen
Now that we have our list page, we want to add another UIViewController
for displaying selected photos. Let's add a new UIViewController
and call it PhotoController
. In PhotoController
, we are going to build a screen that simply displays the same content in the PhotoCell
, but a bit larger.
First, let's add the navigation flow from MainController
to PhotoController
. We are going to be pushing a new PhotoController
whenever a row is selected. Open up TableSource.cs
and add the following; at the top, we need to add an EventHandler
:
public event EventHandler<GalleryItem> ItemSelected;
Whenever the row is selected we want to fire this event:
public override void RowSelected (UITableView tableView, NSIndexPath indexPath) { if ...
Get Xamarin Blueprints now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.