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 :)
Related
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.
I'm having a little problem when trying to go to the next UIViewController from a UICollectionViewController. The problem is: While the next view is pushed, a black background seems to be added behind the right side of the navigation bar. I tried to replace the next view controller but the problem is still there. But when replacing the UICollectionViewController with another one, the problem vanishes.
Note: this problem seems to be an iOS 7.1 bug. Because i don't remember that it happened before I updated my devices.
Here is a Video of my problem if you didn't understand me
Anyone can help ?
Thank you all in advance and sorry for my english,
Bader
Setting self.navigationController.view.backgroundColor to the color you want will solve this problem.
I had exactly the same problem.
It's a bug.
UINavigationController view has a black background, and it spoils translucent Navigation Bar at transition time.
To resolve this issue, you should change background of UINavigationController in code by this way:
self.navigationController.view.backgroundColor = [UIColor whiteColor];
Or set view color of UINavigationController in Interface Builder:
Ok, i finally knew what caused this problem. That was because i added an ILTranslucentView as a subview of a UICollectionView cell. Also, using a UIToolbar instead causes the same issue ( i still believe this is an iOS 7.1 bug because this wasn't happening before ).
Solution: remove any UIToolbar from your view controller.
While the next view is pushed, in that view controller’s .m file remove self.edgesForExtendedLayout = UIRectEdgeNone; if you wrote in your code.
self.navigationController.navigationBar.translucent = NO
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
I am making the following view controller(VC) structure.
[UINavigationViewController] -> [UIPageViewController] -> [UIViewControllers]
then, this VC should support portrait and landscape orientation.
A problem I have is raised at changing orientation to any sides.
you can see the problem.
red area is background color of child VC on UIPageViewController.
blue area is background color of UIPageViewController.
I guess child VC was not relayouted by UIPageViewController. I have figured it out for a long time. I finally ended up finding a work around to add the following overridden function to custom UIPageViewController.
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
[self setViewControllers:self.viewControllers
direction:UIPageViewControllerNavigationDirectionForward
animated:NO
completion:NULL];
}
Although moving a view to downside is showed as soon as finishing rotation. This code solves the problem roughly.
anyway, I really want to know any nice and natural solutions.
UPDATE
My app works well on iOS6. it may be iOS7 bug?
I have solved this problem to place the following SINGLE line of code in [viewDidLoaded] of custom UIPageViewController.
self.automaticallyAdjustsScrollViewInsets = NO;
I supposed that UIPageViewController has a scroll view, and if it is embedded in UINavigationController, it will lay out incorrectly since changing orientation.
Fortunately, my solution fitted in the problem.
#MirkoCatalano Thank you for your comments. these are very helpful to found out right solution.
After building my iPad app against iOS 6.0 SDK, I get this weird behavior with my UISplitViewController's detailed view. The detailed view is positioned 20 pixels (points / 40 pixels) lower than it should be.
Here is what it looked like under 5.1:
For DetailViewController_iPad.xib in Interface Builder I've set the Simulated Metrics > Top Bar to None. This didn't help.
I've logged the view frame:
- (void) viewDidLayoutSubviews {
//.. etc
NSLog(#"viewDidLayoutSubviews: %#", CGRectCreateDictionaryRepresentation(self.view.frame) );
}
This logs the height as 684 instead of the what it should be: 704.
Height = 684; Width = 703; X = 0; Y = 0;
Anyone have any experience with this sort of thing? What should I try next?
UPDATE: This problem seems intermittent, with some compiles causing it, and some not.
If anyone else has had this problem and found out what causes it, I'd still be keen to know.
I had the exact same issue!
The issue will occur when there is another view controller in the navigation controller and this split view controller is pushed in the method application:didFinishLaunchingWithOptions: during app launch.
This fixed the problem for me:
When pushing the splitViewController I used
dispatch_async(dispatch_get_main_queue(), ^{
[self.navigationController pushViewController:splitViewController animated:NO];
})
instead of
[self.navigationController pushViewController:splitViewController animated:NO];
I used this only for iOS6 otherwise first view will be momentarily showed in OS < iOS6.
I'm assuming you're not doing anything to effect the frame of the view in code, correct? It's the view's controller that's doing all the layout? If so, have you tried tinkering with -wantsFullScreenLayout?
When a view controller presents its view, it normally shrinks that view so that its frame does not overlap the device’s status bar. Setting this property to YES causes the view controller to size its view so that it fills the entire screen, including the area under the status bar. (Of course, for this to happen, the window hosting the view controller must itself be sized to fill the entire screen, including the area underneath the status bar.) You would typically set this property to YES in cases where you have a translucent status bar and want your view’s content to be visible behind that view.
If this property is YES, the view is not resized in a way that would cause it to underlap a tab bar but is resized to underlap translucent toolbars. Regardless of the value of this property, navigation controllers always allow views to underlap translucent navigation bars.
The default value of this property is NO, which causes the view to be laid out so it does not underlap the status bar.
Mind you, -wantsFullScreenLayout should really only effect a window's root view controller. So if this fixes your problem (and you're not doing anything goofy with your view controller hierarchy), please file a bug with Apple!
Maybe [UIViewController statusBarHidden] is set to NO on your detail controller?
Xcode 4.5 has a habit of applying autolayout, which may be the cause of some of your grief - inspect this and trying deselecting it.
have you set autosizng property of height in xib file or programmatically, if yes try removing them and see if it helps the problem.
May help.
I was also affected with same issue i had just reduce size of view in my example:
I have 480px height in XIB for iPhone Apps and i reduce it to 460px.
Please same do for iPad not sure but may help.
I got the same problem when i tried to present another viewcontroller in ViewWillAppear method. I got it solved by moving my presentViewController code to ViewDidAppear method. Hope it will help.