Lists in Xamarin Watch

Intro

There is documentation and a sample on Xamarin.com to show how to add lists to a Watch application, but it can be a bit confusing, so I created a very simple example that we can walk through line by line.

To get started, reate a new single page iOS application; let’s call it WatchRowsDemo

Fill in the program name, etc. And when the app is created, click on solution and choose Add New Project. In the New Project window click on Extension and WatchKit App.

Click your way through and once done you will have three projects:

  • WatchRowsDemo
  • WatchRowsDemoWatchKitApp  
  • WatchRowsDemoWatchKitExtension.  

It is important to keep these three straight:  WatchRowsDemo is the parent or main application.  WatchRowsDemoWatchKitApp is the UI for your watch application, while WatchRowsDemoWatchKitExtension is where the logic for you watch application resides.

A key concept to remember is

  • your UI (storyboards) go in …WatchKitApp 
  • your logic (controllers) go in …WatchKitExtension.

Your application is born with Interface.storyboard and InterfaceController.

Continued here

Share

About Jesse Liberty

Jesse Liberty is an independent consultant and programmer with three decades of experience writing and delivering software projects. He is the author of 2 dozen books and multiple Pluralsight courses, and has been a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS. He is a Xamarin Certified Mobile Developer and a Xamarin MVP, Microsoft MVP and Telerik MVP.
This entry was posted in Essentials and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.