Search code examples
ioswatchkitapple-watchios-extensions

How to overlap two controls in iOS watch kit using interfacebuilder


I have two button with images and i want to overlap one over another. Is it even possible to do it iOS Watch? Moreover, how to handle background or foreground depth of a WKInterfaceObject in watch programming, like sendViewtoBackground or bringSubViewtoFront, as in normal iOS programming ?


Solution

  • WatchOS4+

    For Watch OS4+ follow the answer that @DrMickeyLauer gave.

    Outdated answer

    In the watch you don't have a Z hierarchy.

    The max you can do is using a group, that has a background and then have controls over that background.

    Another alternative (hack?) is to render all your hierarchy into an UIImage and set it in the watch.