Firstly, I'm French so; sorry for the english mistakes, I hope you'll understand my problem. I've only been working on iOS apps 3 months, maybe I havn't got all iOS development concepts.
I have an app correctly running on device and simulator using iOS 5 but when I try it on a iOS6 device or simulator I have a weird situation. A black bar appears at the top of the screen between the navigation bar and my tableview.
I did some research, others have the same problem but, what solved their problem didn't work for me.
See: Black bar between navigation bar and table view appears on iOS 6
I'm facing this problem since I upgraded my xcode version to 4.5 and the iOS6 SDK. See the following screenshots of the simulator, firstly running iOS6 then iOS5. The weird thing is that the black bar is here just after the application is launched. If I changed tab (obviously viewcontrollers are switched) then the black bar is no longer present.
I try to change the first viewController by switching the element of my tabBar but the same situation appears even if I put the tab called "Tendances" in first. The black bar is on this view but not on the others.
I have made these screenshots on the iphone 3 simulator but using iphone4 or 5 simulator or a real device didn't resolve my issue.
Screenshot 1: I launch the application on a iOS6 simulator. You may see that the black bar is betwen the navigation bar and the tableView header.
Screenshot 2: I'm still running the same app on the same simulation (iOS6), I decided to switch tab, using the tabBarController. The black bar disappear.
Screenshot 3: I go back to the first tab then there is no black bar...
Screenshot 4: I closed the simulator running iOS6 for another running iOS5. I launched the app then as you may seen there is no black bar.
I had the exact same problem: when first launching the app / this tableviewcontroller (mine is a fetchedresultscontroller, just to be more clear), the navigation bar would shrink in height and a black bar would appear in between the navigation bar and the viewcontroller's items. If I switched to a different view controller (not a tableview one) and came back, the bar would be gone and the nav bar back to its normal size. I have spent my last 3 hours looking for answers and just trying everything out there but nothing worked for me.
What did work in my case is a pretty weird solution: making the navigation bar invisible and then visible once again. So it seems like this actually loads it twice, first time being with the black bar and the second one, back to normal.
In my viewDidLoad I have this now:
[self.navigationController setNavigationBarHidden:YES];
[self.navigationController setNavigationBarHidden:NO];
Try this solution: How to set the top position = 0 after setStatusBarHidden:Yes?
I had once had the same issue, struggled through a lot of SO pages but this was the ultimate solution.
Related
I am testing an app in iPhone X Simulator and I have written code in Objective-c. It has Tab bar view controller and it seems that Tab bar is having more padding than before. I have tested the same app in other simulators and it looks fine. It's throwing this issue in just iPhone X simulator.
This is how the view looks.
As you can see there's a part of the text that's chipped and the tab bar seems to be covering the white view little bit.
Could anyone please help me with this? Any help is appreciated. Thank you.
From this tutorial and after initialization of tab bar writing this line in appdelegate class
(self.tabBarController.tabBar as? ESTabBar)?.itemCustomPositioning = .fillIncludeSeparator
Solves my problem of tab bar.
I've recently updated my project for iOS 10 and now the buttons on the bottom of the screen don't work in the ipad simulator. Other buttons in the app work while in the ipad simulator and all of the buttons work on all of the other simulators. Tried searching around for this problem but didn't find anything so I'm pretty stumped.
Edit:
Buttons that aren't working are "Bet High", "+", "-", "Bet Low". You can click them and tell they are clicked by the animation but the action linked to the buttons aren't getting called. Clicking the ad works too
screenshot
Edit #2:
Now I feel stupid. After poking around with NSLog I found that the iPad Pro (9.7 inch) simulator thought it was a 3.5 inch display so it was using my storyboard for 3.5 inch displays which didn't have those buttons hooked up to their corresponding actions (still weird though as each storyboard was duplicated from my original storyboard for the 4.7 inch display which had everything hooked up when duplicated)
*face palm
Check the UI like storyboard, buttons and so on. You can try rebuild the button again. If the problem still happen again, copy the sample code from internet like Apple Developer and check your code. You can also the your simulator and run it again.
I've noticed some interesting behavior with an app in iOS7. The navbar normally has the following color:
On all real devices, when the app is backgrounded or opened up, the navbar is temporarily covered with a black almost gradient mask that looks like this:
In the simulator, when the app is open and is backgrounded, I get the same black mask over it but the black is slightly shorter from top to bottom, but when it is opened up again I get the following weird white streak:
This is all temporary, and once the app finishes launching it goes away. Does anyone know what would cause this to happen?
I finally tracked down the issue to the following code in a table view controller I had:
if( IS_OS_7_OR_LATER ){
self.edgesForExtendedLayout = UIRectEdgeNone;
self.extendedLayoutIncludesOpaqueBars = YES;
}
The weird thing is, I've used this a million times to make the tableView properly sit under the navigation bar rather than just under it, so normally without this code it doesn't work right on iOS7 - but for some reason it does now. I'll have to look more into that... For some reason removing it from all my tableviews fixes the problem, but removing it from my regular view controllers fixes the navbar color problem, but makes the view's sit under the nav bar again.
I solved this issue by making sure I checked "Under Top Bars" in storyboard on the View Controller's attributes.
I have a serious problem with an App on iPhone 4 devices running IOS 7. My App has a TabbarController with 5 Tabs each Tab has a NavigationController (and the view a navigationbar). My App is working great on iPhone 5 and even with all devices in the simulator but not with a real iPhone 4.
My goal was that every Tab has its own navigationbar color, so in the viewWillAppear method i made for example this:
[self.navigationController.navigationBar setBarTintColor:[UIColor colorWithRed:0.102 green:0.129 blue:0.282 alpha:1.0]];
[self.navigationController.navigationBar setTranslucent:YES];
As I mentioned before, it works great except the real iPhone 4. If I switch through the tabs all seems to be working, colors of the navigationbars are correct. But when I open one Tab again (which I already have opened before) the navigationBar is PLAIN WHITE!!!
I am confused why?
For those who ran into the same issue... it is a bug and already reported.
See the Apple DEV Forum. It seems that this is only happening if you also use the mapkit.
I develop a iPad App with has one UISplitViewController. In the DetailView is a TabBarController with some NavigationControllers.
My Problem is that: The Detail View is Black when i start the App in Landscape, Home Button Right. When i turn the iPad around that the Home Button is on the left side, the Detail View shows content. When i start the App in Landscape, Home Button Left all works fine.
I tested several things, like rebooting the device or modify the shouldAutorotateToInterfaceOrientation, but nothing helped.
iOS 4 Problem. Fixed in newer Versions.