How does it superimpose elements (the timer is above the map) ?
To my understanding, you can only use background images on groups, no other kind of custom views...
Any idea ?
My initial guess is that they're using a dynamically-generated image of a map as the background image in the group. The giveaway is that, while WKInterfaceMap allows you to add custom annotations, you can't draw custom shapes like the blue route line.
I could be way off.
The way Uber (and most of the big companies custom's UI) is done is that they're just generating an image in the iOS which is the sent back to the WatchKit extensions and simply displayed as an image.
If you want to create your custom UI with hte current version of the SDK, this is the only way to achieve exactly what you want. You will need some hacks to achieve interactivity but you should be able to do that on your own :)
Related
I'm building an app, and I want the main view to be "tile" based, kind of like how the App Store looks:
In other words, I'd like to be able to add rounded "tiles" (like the get fit, now trending) to my view with certain information- a method that adds tiles in certain scenarios, with certain information. I'd also like the view to be scrollable, and the tiles to expand and reveal more information when clicked.
I have no idea how to start this, so I'm sorry for the vagueness, but any help is appreciated.
Anyone looking to make a UI like the App Store's today page will find what they want in the Cocoapod called "Cards."
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?
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.
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.)
How do I place an object (for example a button) above another object (for example a map) in WatchKit?
This is the exact thing I'm trying to achieve:
Is it possible? I've noticed other apps, like Instagram, does it:
At this time, the only layering is by setting the background image of the group and putting elements inside it.
Reference:
https://devforums.apple.com/message/1095201#1095201
May be Instagram is following the same approach.
I am a newbie at iOS development so please be kind.
I want to use the default camera button as a UIButton. (I want the camera button to be displayed against a field in my form and want to use the default graphic because users are familiar with it)
I don't see any option to insert it as a simple UIButton, I don't want it in the toolbar.
If it's not possible to include it this way, can I use it's image as UIButton? Or it can cause any objection in the app review?
You can use UIKit Artwork Extractor project to get internal iOS images from simulator, but I'm not sure if it's legal to use these images.
There are some examples:
PS:
You also can get a third-party icon for your needs, e.g. from http://www.glyphish.com/
You can use UIBarButtonSystemItemCamera from UIBarButtonItem. It is a UIBarButtonItem, not a UIButton, but it is the real deal.
I ended up using a custom graphic which we owned to avoid any possibility of legal issues or app rejection.
I am working with a small camera app for a client and I have now finished all functionality of it. In the standard camera controls i need to modify one thing , the cancel button should say gallery instead.
But unless i am missing something i will need to remove the overlay by setting showsCameraControls to NO and then building my entire overlayView from scratch.
I have found this solution but I am afraid to go this route due to the warning in the beginning of the post.
So is there any valid way of doing simple small modifications to the existing camera overlay control UI or do you have to build it from scratch if you need to change one tiiiiiiny thing?
Unfortunately, having been in this situation I can safely say you need to build the controls from scratch. You really only have two options: create your own camera overlay, or use the default one.
Now, you could use the techniques described in the link you cite, and iterate through the various subviews and modify them 'blind'. The rather large danger with this is every time Apple change the internal structure of the image picker it could potentially break your solution. So I'd definitely stay clear of it.