UINavigationController scrolls down on back button click - ios

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.

Related

My app's main view doesn't resize to fill the screen when the device is rotated

Recently I ran into an issue with my app when changing the device's orientation.
This is my main ViewController (let's call it VC1) in portrait mode:
Now if you push / present any viewcontroller (let's call that VC2), rotate the screen while in VC2, and return back to the previous view (VC1), this is what I get:
Why doesn't VC1 rotate correctly like it should? This issue happens throughout the whole app and with any two views. I honestly have no idea what might be causing this or where to look, so any help would be appreciated.
Do you use constraints and autolayout? Can you post a screeen where constraints of the view are visible? I think there are some missing constraints
your navigation bar is properly resize in portrait and landscape mode So The main problem is you didn't add trailing Constraints to your view.
Just Add you trailing constraints on your view in Storyboard.

Content moving in PageViewController tutorial slides

I'm using StoryBoards and have a PageViewController for my app tutorial screens.
All viewcontroller's on the storyboard are basically the same, except for a different image of course. When it's running... the first view shows the image anchored to the bottom instead of centering in the view.
As soon as I start sliding to the left, it jumps up to where it should be. All other subsequent views are working great. The second screen grab shows what happens after I start sliding to the next screen.
I'm stumped, I've never seen this before.
Any ideas?
Please check automaticallyAdjustsScrollViewInsets is set to false in your container.

iPad UITableView top right corner covered with white box in landscape popover

I am attempting to create a custom popover for an iPad application in landscape orientation. I created a new UITableViewController with static cells on my storyboard and set the size setting to "free form". I then set the size of the UITableView to my desired size. I connected a Modal segue from the parent controller to the new popover.
Then in the parent UIViewController I created a method that performs the segue through a custom presenter. After working through a bug in Apple's orientation handling routines, I got the popover to show at the correct location.
When I run the app, I then discovered that in the top right hand corner of the UITableView a white box is displayed that covers whatever I place in the UITableViewCell. The more cells I place in the table the longer this white box appears. So I believe it has something to do with the UITableViewCell not orienting properly although I have not figured out what yet.
I cannot seem to find what this box is, nor have I had any luck getting rid of it. Has anyone seen something like this? Any help to get this white box remove (or whatever is needed to get the cells working correctly again), will be greatly appreciated.
Thanks in advance
For anyone who is interested, I was able to work around this problem. It turns out that there is a bug in the modal segue logic that does not handle landscape orientation. So I created a XIB and presented that as my modal view. I still need to adjust things since it is landscape but the view displays correctly.
From what I understand this storyboard bug should be fixed soon.

iOS 7 popViewControllerAnimated shifting entire view upwards

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];

Problem with the position of the view of RootController inside of a SplitView

I changed my rootView controller of my split view to add one UIimage and an UIView. All works fine but when I navigate in portrait mode and change to landscape mode my view is a few pixels down than it have to stay. If I navigate in landscape mode it doesn't occur. And the most strange is if I navigate in portrait and I push the popover button and then I change the orientation, the view of the root is in the perfect place :S.
Is like the popover put it in the correct place.
Could you help me please?
Thank you very much.
Check all places where you manually set property frame of your views that are not correctly displayed.
Check property autoresizingMask of your all view.
If problem wasn't found place your code here.
Finally I resolve the problem: When I dismiss the popover I have to get out the animation. If I do this, all works fine :)

Resources