IOS7 / Bug with 'TabBar.translucent=NO' in the QuickDialogController repaint?

1,287 views
Skip to first unread message

Andreas Tuschen

unread,
Oct 2, 2013, 5:45:06 AM10/2/13
to quick...@googlegroups.com
I have a problem with the QuickDialog Librarys running on IOS7/XCode5

Translucent = No ist used to protect the content of a view controller from "flowing" behind a tabbar.

Because of the blurred bars in iOS7, a UIViewController‘s frame now starts from the very top of the screen (behind the status bar), all the way to the bottom (behind any tab bars, if present). Previously the content would begin below a navigation bar and extend to the top of a tab bar, or to the bottom depending on your UIVC setup. This is a pretty big change. If you build an older app on iOS7, your positioning is probably going to be messed up a bit.
However, this changes again under certain conditions… If your UIViewController is contained within a UINavigationController with it’s navigationBars’ translucent property set to NO, then the content will start from beneath the navigation bar, as per the old way of doing things. Translucency means the view is see through, so obviously if it isn’t then there’s no point extending the view above the bar if it’s not going to make any visual changes. This also applies to a UITabBarController‘s tabBar, where the view controller’s view will only extend up to the top of the bar.

I have to use this parameter in my project to protect a pdf viewer from displaying the buttom of the pdf page "under" the tabbar.

So this is what i do:

Use a Tabbar to switch between 4 ViewController (using QuickDialogController)


In the Every QuickDialogController i set the "translucent" option:

- (void)viewDidLoad
{
   
[super viewDidLoad];
   
   
self.tabBarController.tabBar.translucent=NO;

}


When i first enter the dialog (using the tabbar) everything is ok:

Now if i change via the tabbar to another dialog and return to the first dialog again something strange is showing up:

As you can see a grey "space" wich is excatly matching the tabbar's heigh is sitting above the tabbar?

Is there probably a error in the repaint event of your QuickDialog Controller?

Thanks for your help!

Andreas





Tommie N. Carter, Jr.

unread,
Oct 11, 2013, 1:47:56 PM10/11/13
to quick...@googlegroups.com
This sounds like a typical view lifecycle issue. I would suggest that you move the translucent code to viewWillAppear:animated after the call to [super viewWillAppear:animated]. I think that will ensure that the UI is updated at the right time. Currently viewDidLoad is guaranteed to run only at least once when your view is loaded from the nib file.

Andreas Tuschen

unread,
Nov 7, 2013, 4:53:28 AM11/7/13
to quick...@googlegroups.com
Sorry, this doesn't help, the display error is still there ...
Reply all
Reply to author
Forward
0 new messages