Soheil
Soheil

Reputation: 5364

Can I add button on Map in watchkit?

I'm trying to build an app for Apple Watch OS 2, so I was wondering is it possible to add buttons or images on top of the map?

Upvotes: 0

Views: 174

Answers (2)

Stephen Johnson
Stephen Johnson

Reputation: 5121

You would need to do your own tile rendering to do something like that. I have four buttons over the top of my maps and I render custom waypoints and routes on the map. To do that I have a custom tile render that generates an image that I set for the watch background and then I overlay buttons on top of it. Here is some more info on how I overlay the buttons Is it possible to position views on top of each other. (One thing that has changed since that post is that I no longer break the background up into four images, I can just set the background as a single image. Somehow I missed that when I initially read the API docs. Also, I turned off the animations for watchOS 1 and I have them on for watchOS 2.)

Upvotes: 0

Frodo
Frodo

Reputation: 91

As far as I know, there isn't such a thing like "multiple layers", as you might call it, which would allow you to arrange a thing on top of another thing, in WatchOS yet.

So, I don't think, that the thing you want would work, sorry.

Upvotes: 1

Related Questions