iOS AutoLayout LayoutGuide disappears on Memory Warning - ios

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.

Related

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.

iOS Blank White Space at bottom of viewcontroller

A strange white space appears at the bottom of a viewcontroller sometimes it disappear.
White space hides a button at the bottom left.
Please, help me out, I've searched a lot only thing I came across is
self.automaticallyAdjustsScrollViewInsets = false;
But it's not working
Thanks
This can happen due to either of the two reasons
1. Another view is overlapping your view
2. Height for your view is not enough to contain all the contents and view.clipsToBounds is set to Yes.
View debugging option in Xcode can show you what is happening.
Reproduce the issue in simulator and press the 'debug view hierarchy' button in Xcode. Xcode will render a 3D model of the view hierarchy which you can view from any angle by moving the model around with mouse. Click on any point on the model and Xcode will tell you what view it is and you can identify the overlapping view.

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

UIScroll View on IOS 7 lingo

okay, my app was built on for iOS 6 until iOS 7 got released and i started making changes to support both versions. Now, i'm having problems with UScrollView and it's constraints on storyboard. when i add a scroll view to my view which has a navigation bar and add a button (or any subview) for say 20 points under the navigation bar, at runtime the subview get's misplaced vertically. it moves downwards in like 60 points. i guess the same size as the navi bar and the status bar combined. So, i was pulling my hair to know how to fix it with constraints and auto layout but i couldn't figure out how. the app sometimes crashes with a certain mix of layouts. However, what i did was to pull the scroll view aside and place the subviews as i want them to look like with navi bar there, then i pulled it back in it's right place (covering the entire view) and when i run the app it all works as expected. now the question what constraints should i add so that it works as expected without doing the whole process aside and then adding it? right now my view looks like this:
As you can see the button is under the navi bar. but when i runt he app it gets under the bar as i want it to. so how can i just add it on story board under the bar and let it stay there? in iOS 6 i used to do it that way without worrying and ios 7 seems like doing this hard on us.

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