UIPrintInteractionController半透明条问题

问题描述 投票:0回答:3

UIPrintInteractionController在iPhone中作为模态视图呈现,然后我在顶部获得半透明条。我希望它是不透明的,这样后台视图的导航栏就不可见了。请参阅屏幕截图以获得更好的说明。提前致谢。

ios objective-c ios6 uiprintinteractioncntrler
3个回答
0
投票

当您要从父视图控制器显示模态视图时隐藏导航栏,并在取消模态视图时将导航栏取消隐藏。


0
投票

由于您还没有发布任何代码,答案可能不准确。

但是,您可以尝试在整个应用程序中更改导航栏的外观。

也许这可以帮助你实现这一目标:(在你alloc/init navigationcontroller AppDelegate.m之后把它放好)

if ([UINavigationBar respondsToSelector:@selector(appearance)]) 
{   
    // For iOS 5.0 and above
    [[UINavigationBar appearance] setBarStyle:UIBarStyleBlackOpaque];
    // Black Opaque or whatever your choice is
} 
else 
{   
    // For iOS below 5.0
    self.navController.navigationBar.barStyle = UIBarStyleBlackOpaque;
    // Black Opaque or whatever your choice is
}

一旦你申请了,请告诉我结果。


0
投票

六年后我在iOS 11中遇到了这个问题!我不得不补充一点:

[[UINavigationBar appearance] setTranslucent:NO]

我没有在我的应用程序的任何地方将导航栏设置为半透明,但我想这是现​​在的默认值?

如果你想在你的应用程序的其他地方使用半透明导航栏,我认为你可以实现UIPrintInteractionControllerDelegate并使用printInteractionControllerWillDismissPrinterOptions在弹出窗口关闭时再次将半透明设置回YES。

© www.soinside.com 2019 - 2024. All rights reserved.