Reputation: 4313
I'm trying to layout objects (specifically, 2 images and 3 labels) within a table row of an Apple Watch app (using WKInterfaceTable).
I cannot have precise control of the starting X and Y position of the objects, as the layout system for the Watch is different from iOS/OS X.
I also have a problem of the objects not "wrapping to the next line" but instead overflowing to beyond the bounds of the displayable area of the Watch (as displayed in Interface Builder/xCode). It seems that there is no easy way to force the objects to be "wrapped" when there is no more space to display on the right.
I need to layout the objects precisely as I want them to be. How do I solve this problem? Can I do it within Interface Builder (xCode) or do I have to do it programatically (and if so, how?)?
Thanks!
Upvotes: 0
Views: 326
Reputation: 4313
I think it found the solution: Yes, WKInterfaceGroups is the answer. The trick is keep in mind that everything is squares and rectangles, and to properly set Horizontal and Vertical (of the Layout) and use several WKInterfaceGroups. There is no free placement or adjustment of objects in Watch apps.
Upvotes: 0
Reputation: 4021
Sound like WKInterfaceGroups
could be what you need. Apple's own documentation is a bit thin but if you Google a bit you'll find many examples how to do pretty complex layouts (I've seen graphs being drawn with groups) and animations with groups.
Upvotes: 2