Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Label on Top of Image in Apple Watch Storyboard

So I'm trying to make an apple watch app. I noticed that elements on the storyboard can only be positioned side by side using a group. But the UI I want requires a background image and a label on top of it. How can I ? Is it even possible to do this in Apple Watch storyboard?

I don't own this art. I found this on the internet but this is similar to what I want to achieve

like image 935
cessmestreet Avatar asked Apr 29 '15 06:04

cessmestreet


1 Answers

Try this:

  1. Create a Group
  2. Set group's Background in Interface Builder
    • Background image which should be displayed below label
    • By Background for the group, you will basically create "visual container". In your example this would an be image containing coin with rectangle on right
  3. Add label to the group
  4. Position and style the label inside the group to according to your needs

You cannot achieve this effect simply by putting 2 views in the same superview and position them correctly because there is no such a concept in WatchKit. Elements within Group are always automatically arranged horizontally / vertically based on Group settings on the same z-axis level (there is no "views depth").

like image 173
Lukas Kukacka Avatar answered Oct 10 '22 04:10

Lukas Kukacka