OK, Ive looked everywhere for an answer, and I am unsure of what you may call this by a name - but I have detailed what my issue is below.
In my main.storyboard file, I have a view as a child from a navigation controller (i.e., allowing nav bar navigation) - being a MKMapView, which when you tap on a pin, it brings up the next scene.. This is all as it should be... (lets call it the "map" and the "detail" scene)
BUT!!!
When you hit the back button, the map view glitches and overlays the detail views background image over the mkmapview for about half a second. Would anyone be able to suggest what this problem is? Thanks soo much!
Due to stack overflow, I can't upload a picture just yet (reputation).. are you allowed to link externally?
Your help is very much appreciated.
EDIT: Ive uploaded a screenshot: http://tinypic.com/r/e19gtx/8
Try
self.view.backgroundColor = [UIColor whiteColor];
in ViewDidLoad.
Basically make sure your glitchy view has a background colour.
Did you use segue? Try manually pusing the "detail" view controller onto the map using
[self.navigationController pushViewController:#yourDetailViewController# animated:YES]
hope this works, i encountered this before.
Related
My UITababarController image moving up down when I am coming back from any controller back to UITabbarController.
You can check the following the link for the video:-
https://drive.google.com/file/d/1M06Uzik0qwiMJr8k0PxwoFVm4GfpGyXL/view?usp=sharing
Screens sizes (4.7) having this issue
Thanks Abhijit,
To bringing this issue into our notice.
Yes, UITababarController image is fluctuating when you come back to parent view controller.
You can fix it by using below line of code
[self.tabBar setTranslucent:NO];
Or simply set the isTranslucent = false in UITabBarController
Happy to help you :)
I'm developing an iOS 10 app using NavigationController and Storyboards. I'm having a difficult time to figure out whats going on with a strange - as I'm calling it - bug:
When I navigate to a new ViewController, it show's nicely, but when the app unwind a segue, the top view controller doesn't go all the way to the right, instead, it left's about 50 points on screen, and then suddenly it goes away...
I'm putting a image that illustrates what I'm talking about...
PS: both ViewControllers uses UIImageView as background...
Thanks a lot!
Please share the code where you are setting the fame for the view(s). It could possibly be an offset that is being added. Though, you do mention that it does go away suddenly, so it could be something else.
I modified AAPLSearchBarEmbeddedInNavigationBarViewController in Apple's UICatalog sample code so that it pushes another instance of AAPLSearchBarEmbeddedInNavigationBarViewController onto the navigation stack when a cell is selected. In the second view controller the UISearchBar set as the title view of the UINavigationBar (just like the first one) isn't tappable (unlike the first the one). This seems like a bug. How do I fix it? Here is my modified UICatalog code:
https://github.com/stevemoser/UICatalog
Also I tested with with Xcode 6 and 7. It's broken in both.
The solution is to set the first VC self.definesPresentationContext = NO when navigating away from it and making sure to call self.definesPresentationContext=YES in the view did appear so that the visible VC allows defines the presentation context.
Thanks goes to Rory McKinnel who put me on the right track.
After upgrading my project to iOS7
when I do a BACK Button and the UINavigationController goes back to the previous page, an ImageView on the top of the screen shifts down.
I use IB to do my layouts. These are my Simulated Metrics:
I have AutoLayout off. Any ideas on what the issue might be? I wasnt sure if anyone wants to see specific code and I didnt want to clutter up the question with too much code.
Updates: Based on the comment questions, I wanted to make these updates:
In no place in the application .h or .m file do I make any changes to the imageview's sizes or location.
In both the viewDidLoad and viewDidAppear I call a user-defined method called recalculateAll but their is no reference at all to any imageview sizes. Just for trying it out I commented out the entire section and ran the code and it still jumps down.
In my init I do programatically set some imageviews (you see the #132 in what appears to be a bubble) using their x and y's.
Here is a typical navigation I use for moving from the view controller to the tableviewcontroller:
GetTimeOffByType *showTimeOffReport = [[GetTimeOffByType alloc] initWithNibName:#"GetTimeOffByType" bundle:nil];
showTimeOffReport.timeOffType = #"Vacation";
[self.navigationController pushViewController:showTimeOffReport animated:YES];
These are all .xib files, no storyboarding at all. Its basically a view controller which has an embedded UINavigationController with 6 buttons. Each time a button is pressed it pushes a UITableViewController passing different parameters and showing different data. The transition I am using to get back to the original UIViewController is simply the iOS generated BACK button (so no code to show for that)
Update#2 Hopefully this will help someone solve this wierd behavior. So if I were to click on the table view cell on showTimeOffReport to get the cell detail and then using BACK navigate all the way back it doesnt jump down.
Update#3 Ok this is something I just discovered : The issue of jumping down or not is related to the translucency of the UINavigationBar. If you have a Translucent = YES it will start from the top of the window. If you have a translucent = NO it will start from the bottom of the UINavigationBar.
You might try setting the new property on UIViewController edgesForExtendedLayout to UIRectEdgeNone.
Here is a good resource that explains more about how view layouts changed in iOS 7.
See Apple Documentation
If you plan to be backwards compatible you will probably need to do some runtime checks and adjust positioning if the device is not running iOS 7.
This might help you..You can try adding UIViewControllerBasedStatusBarAppearance key and set it's value NO in your info.plist
UIViewControllerBasedStatusBarAppearance = NO
Ok this is a little hard to explain but here I go. On "View1" I use a UIView animation to go to "View2". The animation I do is a fade through black, switching views. I get to View2 by doing -addSubview. Now lets say we are on View2, and my action gets called to go to View3 using presentModalView. Since I need to remove the "View2" view, I do [self.view removeFromSuperview]; in my viewDidDisappear method so that the animation going to View3 is not screwed up.
Here is the problem, when I go from my "View3" back to "View1" I use a presentModalView again with an animation flip. Now you know when you usually flip views, you see a background in the back of a color (usually white), instead it is my "View2". So it is like it is being cached in a way.
Does anyone know why this is? If I need to post code, I can.
You can actually check this tutorial about using the UINavigationController:
http://www.icodeblog.com/2008/08/03/iphone-programming-tutorial-transitioning-between-views/
To hide your Navigation Bar you can actually see this post:
Is it possible use UINavigationController but hide its navigation bar (replace it with customized toolbar) and go back button
Edit 1:
Uploaded the project now here: http://www.2shared.com/file/qU-QT8fl/Project.html
Read the ReadMe.text file. :P