Instagram sees an opportunity for developing more complex apps for the Apple Watch and so has released the IGInterfaceDataTable open source library to make it easier to configure tables with multidimensional data.

“Instead of flattening your data structures into an array, configure your watch tables using a data source pattern similar to UITableViewDataSource,” Instagram said in the project’s GitHub repository.

“The UITableViewDataSource API provides a simple interface for creating section headers and rows with tables,” said Instagram Engingeer Ryan Nystrom, in an email. “By that, I mean that you could have a section of data called ‘Produce’ that contains the items Lettuce, Apples, Carrots and another section called ‘Dairy’ that has items Milk and Cheddar. In WatchKit you would have to flatten your data and manually distinguish between a header (e.g. Produce/Dairy) and an item (e.g. Lettuce/Milk). IGInterfaceDataTable, just like UITableViewDataSource, distinguishes between the two data types.”

To read this article in full or to leave a comment, please click here