We are working on an app that requires an animation overtop of a map. this is a challenge because the map is a dynamic element and there are obvious limitations to the watch. Does anyone know a way to programatically take a snapshot of the mapview. I figure if we take the screenshot and then create an animation on the phone pushed to the watch this might solve this problem. Open to any other ideas. Thank you!
If you use something other than Apple's mapview you can draw the map yourself and then draw animations over it. Here is an example of where I do this Is it possible to position views on top of each other (the animations in this example transferred too slowly over bluetooth and so I turned them off for the final product). You could look at using something like MapBox (www.mapbox.com) to get map tiles and draw them.
Related
Weird crazy question I know. My current setup is a SCNScene with a camera controlled by the device's gyroscope. I'm able to add and light normal nodes, however I would like to add 2D UIView objects into the scene like UITextViews or maybe some buttons. The views would need to be inside the scene and thus become no longer visible if the camera moves away from them.
Firstly, is this even possible? Or would this be way more difficult to implement than rebuilding an editable textview as a node? Could this be achieved by categories or...?
I just talked to the scenekit people here at WWDC. He said that as of now it is completly impossible to do it in a nice, functional way. The only options he offered as a possible solution is to create the UIView element somewhere off screen or behind the scene and continuously take screenshots of the object and apply those images as a texture to a SCNNode. He also pointed out the performance will be very poor with this because taking screenshots is heavy and you can't get going very quick with it. So I guess this is a no-go until UIView adds support because, according to the engineer, it's impossible to implement this because of a UIView limitation and not a SceneKit one.
Say you have a fixed pin in the middle of the screen using an UIImageView on top of the GMSMapView. At some point in the flow I need to remove the fixed pin and add it as a marker in the map.
One could do so by setting the fixed pin hidden property to true and then adding a GMSMarker in the center of the map using the same asset as the UIImageView. That works except that there is a visual glitch since adding the marker touches the OpenGL layer whether hiding the pin uses UIKit.
Is there any way to synchronize these two operations?
Not really. See this question for a discussion on OpenGL-UIKit syncing — the conclusion is that Apple has access to the private CAEAGLLayer.synchronized and nobody else does.
This is part of the reason why Google limits their SDK map views to 30fps, I'd imagine. Developing on top of a third-party SDK especially limits your syncing possibilities, as you have no/extremely-limited access to GLKView, CAEAGLLayer, or EAGLContext.
I'd suggest investigating Mapbox GL for iOS if you're looking for more wiggle-room and openness. See this issue about ongoing efforts to improve inter-layer view syncing.
ok guys im not to shure where to start with this one its a first for me but i have a floor plan that i would like to show in my IOS7 App and i know i want the user to shrink and grow the image so he or she can zoom in to areas of the map. it would be nice if they could click on the an area of the image and it would be linked to data in my parse database. but i think thats a long way off for me.....
but for now just to let the user shrink and grow and rotate the image would be nice.
anyone got any tutorials they can point me to?
Have a look at Apple's PhotoScroller example. Here an ARC-ready version.
This will not cover rotating the image, but you can easily get this by following this tutorial.
I want to make a a sliding up like FourSquare app.
Like this:
What I want to achieve are:
The UITableView goes all the way up to UINavigationBar.
It drags along with my finger's position.
My app also have a GMSMapView below (Google Map's API, similiar to FourSquare), I don't want the map responses to my gestures on the UITableView, I want it stays still.
Works both in iOS 6 and 7 and iPhone 4,5.
Does anybody have a framework, github's link ... that can help me fulfill this ?
Thank you.
I have been working on something very similar in the past days. This answer is actually quite good, but you will suffer a bit in terms of performance. After more tweaking, I used parts of this library. You don't need to use everything, but keep in mind the following when choosing a library:
Libs that base the movement of the map on the map.centerCoordinate are less performant than libs that base the movement on the map's frame.
You can also read a bit from this tweets exchange I had.
My thoughts about what FourSquare actually did, is that in the beginning they are using a screenshot of the map, so they are not really using a MKMapView, but an UIImageView. Once you touch it and you animate it, they switch between one and another and they start using a map. I will be using Reveal App plus this to know exactly what they are doing.
In the latest Expedia app for iOS, they have a very interesting effect that I am trying to wrap my head around.
When you tap on any tile it flip and zoom animation.
Can you please help me for the same for UIView transition.
I've wanted to use this kind of animations in my app as well, so I have written a simple custom segue that does just that - you can even choose between multiple types of flips!
It's called IBCellFlipSegue, give it a try and let me know what you think!
https://github.com/IBLabs/IBCellFlipSegue