MKMapView moves around screen - ios

I am using an MKMapView to create a thumbnail on my screen. However it doesn't render in the position that I set it to on IB. It moves up. It also moves up even further after I go to push and pop a screen over it. Any idea how to position this correctly?

I figured it out. It was related to auto sizing.
also there was toolbar at the bottom after the push/pop.

Related

Swift: Setting View on top of SceneView not working

I'm trying to set up a layout where a Map is placed on top of the SceneView. When the app builds, the set up flashes for a second, and then the SceneView takes up the whole screen, completely hiding the other two views.
After moving the SceneView on the left hand menu and moving it back, the text started appearing but not the black background.
(I've got constraints set for the Scene View to take up the whole screen, and some constraints (right and bottom) on the Map too.
Why is it not working?
EDIT: It started working after I deleted the view and added it back in, but not sure why. #El Tomato says SceneViews always overlaps other views. Is this true (i.e. by accidentally getting it to work, am I utilizing a bug)?
It is doable. I'm doing it currently with an app I am using, but the difference is that I didn't set up the ARSceneView in the Interface builder, but I added it to fit the whole screen programmatically. I have some buttons that were added through the interface builder, and I added a label with a background now just to make sure it works similarly to how you want it.
I will post some images:
Here i simply have the view controller with some (bad looking buttons) in the stack View as well as the label with a red background. The ARSceneView is added in the my ViewDidAppear function and takes up the whole frame.
This picture is from the screen while the app is executing (Debugging the UI). As you can see, the Label with the background as well as the buttons I've added all show.
I also have 2 buttons that are showing as well (the white and red circle) and these were added programmatically and were brought to the front.
My suggestion is to try and add the ARSceneView programmatically, maybe it doesn't work otherwise. Or you can try to outlet all your views and bring the Map View and the Label to the front using bringSubviewToFront.

Portion of iPad simulator screen responsive to swipes, but not button clicks

I have a UICollectionViewController in a container. On a specific portion of the screen (bottom right area in Landscape), it will register swipes, but the sections of buttons in that area are non-responsive.
The buttons are the top items in the view, so nothing overlays them. Only a portion of the button is non-responsive, and only when it is in that area of the screen. It is consistently the same area in every collectionView that is in a container.
Has anybody encountered this issue? Any potential causes or fixes?
Figured it out. I was using "freeform" viewControllers, and they were messing with my superview size. So, as rdelmar pointed out, my problem was that the buttons were outside the superview.
I solved the problem by deselecting "Resizes View From NIB" in my freeform viewControllers.

GLKView frame size animation causes GL to render only a portion of the screen

I have a GLKView contained in a UIView under a top, nav-like bar. The bar can be shown/hidden with an animation and the autolayout pinning causes the views to fill the portion of the screen under the bar (or the full screen if hidden).
What's odd is that when the top bar begins its show/hide animation, the GLKView immediately jumps to the final height. When showing the top bar (which shrinks the GLKView), it causes clear band to be seen on the top and bottom.
What's also odd is that the view's position seems to work correctly, and animates smoothly down as the top bar comes down until they all eventually line up as they should.
Dumping out out the GLKView's layer.presentationLayer property seems to indicate that it's bounds animates correctly.
The GLK-ness of the view could be a red-herring as I haven't tested this on other parts of the app...will do though...
Very confused. Sorry no photos but it's all NDA and I've no time to make a sample project right now. Maybe later if need be. Thanks...

Programmatically change frame of the UIkeyboard after rotation

Since i have a complex hierarchy of views i handle the rotation manually with CGAffineTransformMakeRotation.
Everything rotates in harmony, status bars, navigation bar etc. The only problem is, if the keyboard was on screen before rotation, it gets the orientation of the satiates bar but its size is not right.
How can i force it to fill the entire width and get the right height?
I tested with a single test UIview and it looks likes this.
http://dl.dropbox.com/u/15251533/iPhoneSimulatorScreenshot_20120430_133558.png
I found a simple approach to get rid of this situation.
If you call resignFirstResponder on the Textfield and afterwards becomefirstresdonder consequently.The keyboard appears in the right position after rotation.It also does not disturb the animation if you have one.

How to make the UIPopOver origin at a same coordinate in the mainView even when I am moving its source button?

I have assigned the uipopover to a horizontally moving object. So when I keeps on moving the popover moves along with it. But I doesnt want it to move. Only want that bottom arrow to move and the popover origin should be same always. So it will appear like only the arrow is moving under it.
Can anyone know how to get this?
This was not possible and so I created a view that will look exactly like the popover and now everything is working fine.

Resources