iOS 7 popViewControllerAnimated shifting entire view upwards - ios

Running into an issue only on iOS 7. On one screen I have a back button that returns to a tableview. That back button's code is [self.navigationController popViewControllerAnimated:YES]; but I'm seeing an issue where all of the content on the screen I go back to is shifting up when i click back (the content shifts to where its supposed to be, but open first viewing it after clicking back, its lower on screen than it should be and then slides up). Previously in iOS 6, it did the animation you'd expect, the left to right movement of the old and new screen, but the content shifting up is new and I can't figure out what's causing it. I set the animated to NO and while that does stop it, I also lose the left to right I want and it looks very jerky going screen to screen. Any thoughts on how to just get the normal left to right slide without it shifting my content?

If you have two VC ,VC1 and VC2 if you are using on VC2.
[self.navigationController popViewControllerAnimated:YES];
Check you xib of VC1 you need to take Navigation Bar at top.

This sounds like an AutoLayout issue. Make sure AutoLayout is turned off, and add the following to your viewDidLoad:
[self.view setTranslatesAutoresizingMaskIntoConstraints:NO];

Related

Input Accessory ViewController Presentation

I present a an inputAccessoryView on as part of a TableViewController, though it works smoothly most of the time, I have an issue with its presentation, as it gets presented sometimes from the right side of screen or sometimes (nicer) from bottom of the screen, any idea why and how to control that?

iOS AutoLayout LayoutGuide disappears on Memory Warning

I'm having some issues with the _UILayoutGuide that dictates the top and bottom of the screen in my app home screen. Everything works fine until a Memory Warning is triggered in a ViewController that's further in the navigation stack and I try to go back to home. For some reason the top and bottom _UILayoutGuide disappear and the constraints that where attached to them just break, making the view either go up or down.
Is there some way to prevent this? alternatives? Where can I hook the view if there's no other option?
Thanks in advance.

Views resize after pushing a view controller

I'm having a really strange behaviour. When my app starts everything is fine: the size of the views on screen are exactly the one specified in the storyboard. But just as I try to push a view controller its contents are scaled, so when I pop back the view is messed up.
Any clues?
First learn about Autolayout. Here is a good way to go
Autolayout
Second I am giving you a trick which may work.
Click on viewController
If you don't want your views to extend their edges to bottom or to the top deselect Under top bars and Under Bottom bars

How to make keyboard stay fixed to UIViewController

I'm using JASidePanels to have a slideout-menu in my app. One of the views I have has a always-visible keyboard. My problem is that, when in this keyboard-fixed view, and I show the menu, the keyboard stays at the center of my window instead of following the view i hid to show the menu. I understand why this is, but I would like to tweak it so it follows the view im swiping to the right, instead of staying in the middle.
TL;DR how can I stick a keyboard fixed to a UIView, instead of staying in front of whole app window

UINavigationController scrolls down on back button click

I'm working on an iPhone / iPad app with several navigation controllers. When I click a back button of a view while the device is in landscape mode, the previous view scrolls vertically into the screen, instead of scrolling horizontally as usual.
Push animations always work horizontally, as it should be.
What could be causing this weird problem?
Thanks,
Adrian
Are you sure the view controller, you're getting back to, is set to deal with rotation properly ?
I had a similar issue using MonoTouch.Dialog until I added Autorotate = true; to every (non-leaf) DialogViewController inside my application.

Resources