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.
Related
Is it possible to only screenshare a specific UIView using AppScreenSource?
I'm creating an iOS app which is using RealityKit to place virtual objects on screen. I'd like to share this video with the other connected user in the room. AppScreensource seems like an almost perfect solution, but I don't want to share the entire screen - just my ARView. Is there a way to do this? Or do I need to go another route?
After going through the doc. I don't find any solution for capturing a portion of the screen. AppScreensource will the whole screen.
Link to the docs - https://www.twilio.com/docs/video/ios-v4-screen-capture
maybe you can use ARView's instance method snapshot(saveToHDR:completion:). There is a working example mentioned in this blog.
I have a TableViewController which is connected to a empty-"template" viewController. I would like to make each cell responsible for its own interface/design.
In other words: the viewController has all elements placed (like UIImage, UILabel, UIText, etc.) and each time when specific cell is selected the viewController starts to fill with specific images/resources. Moreover, it would be great if the resources will be taken from web or cloud (in order to not save everything in the application itself).
So, I imagine it somehow like this:
Flow sketch
The problem is that I deal with this for the first time, and tried to find different ways to solve this problem (in terms of implementation), therefore I would like to ask: does this idea can be implemented in this way or probably there is more reliable way, and which techniques or technology can be used for this realization?
Thank you!
You can do it in multiple approaches. It totally depends on the architecture you have been following.
You can use react/ key-value observing and set the keys when you get a response.
Alternatively, for a very small app or a POC, I would use alamofire as my network manager and as soon as I get a response, I would set the labels. I would use the image extension in alamofire to set the images as it takes more time to download.
I would want to know the exact problem you are facing to help you out. Generic discussion are not normally encouraged here.
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 :)
I am trying to implement a UI in apple watch similar to what Apple shows in their videos.
I would like to show this in the GlanceInterfaceController as well as Apple Watch app's regular Interface Controller. I tried to group the label(WKInterfaceLabel) and image(WKInterfaceImage) objects using the WKInterfaceGroup object, however the view is not coming as both center aligned. Could you please give me some tips on how to implement it using Storyboard (interface builder). Also in the Interface builder, it is not allowing me to place a label(WKInterfaceLabel) on top of the image(WKInterfaceImage) object.
Expected UI (almost):
Developed UI (using Interface builder and Storyboard):
Is it due to some mistake in my Layout implementation?
Thank you in advance!
You can do that in several ways.
One of the easiest and fastest way is to put your elements inside a group and use the image for the group background.
Another way you can do that is generating an image with the text inside using something like this example from Apple.
I am developing an iPad app that needs to have multiple image sources, on the device/Photo Albums, remote and some included with the app. Now the ideal situation would be to have a UIPopover controller with 3 tabs for each source. The only problem is I can't seem to figure out how to have a UIImagePicker be in its own tab. What I am trying to do is very similar to Apple's Keynote for iPad. The photo icon's popover has tabs and the far left tab called media for sure has a UIImagePicker in there. I have no idea how they did that, is it possible for me to do something like that? I think the main issue is that the Image Picker is it's own navigation controller and it cannot be pushed on to another navigation controller. Any help would be greatly appreciated!
check out this - https://github.com/key1jp/ELCImagePickerController
you can implement it with custom asset library
The built-in image picker is no good.
Create your own image picker and add it to your navigation controller as a normal view. Start from either the Matt Tuzzolo or the MyImagePicker from the WWDC 2010 sample code. Note that you probably want to add image and video preview - I copied the image viewer from MyImagePicker and added a 'add' or 'remove' button to it, and the same for video.
Your image picking is in two steps, one for selecting the group, and one for selecting the assets within the group. I recommend dividing the first step into a two - if there is only one, then go directly to that group, i.e. when you have found the first group, check whether that group was the last (block stop argument). Then push the right view controller.
Obiously modify the size of the thumbnails also, they are iPhone size now. Adding a line of metadata (icon and duration) looks much nicer and is more informative for video.
I also recommend adding a 'click-and-hold' function for extended information after like 2 seconds.
Handle different sources by creating a protocol which gives you what you want, i.e.
-(BOOL)isImageAtIndex:(NSInteger)index;
-(UIImage*)thumbnailForUndex:(NSInteger)index;
-(void)setSelectedAtIndex:(NSInteger)index;
Creating a source which handles local files, included resources and assets is perfectly possible - I use NSURLs and check on the url scheme.
Are you not using UITabBarController for your tabs? You should be able to add a UIImagePickerController directly to viewControllers. I'm not sure whether that is a supported use of the image picker, though; the documentation only mentions displaying it modally or displaying it in a UIPopoverController.
It's not usually useful to look at an Apple app to find out what you can do with various built-in controls, as Apple allows themselves to use private APIs.