Chapter 6
Tables and Menus
In Chapter 2, you learned that when building WatchKit user interfaces, you have to know at design time which user interface objects you need and you must include them all in the storyboard. In some cases, this just isn’t possible. Suppose, for example, that you wanted to display the results of a database query in rows, with one row (and hence one group of user interface objects) for each query result. In general, you can’t know in advance how many query results there will be. You could try to work around this by adding a fixed number of groups to the storyboard and then, at run time, hiding any that you find you don’t need. You might be able to make that approach work in some cases, but it’s wasteful of scarce resources ...
Get Learn WatchKit for iOS 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.