大佬教程收集整理的这篇文章主要介绍了ios – 导航栏上的按钮不会拾取窗口色调,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个在iPad上运行的Objective-C应用程序,并显示一个视图控制器,其模式呈现样式为UIModalPresentationPageSheet:
UINavigationController *editorNavigationController = [[UINavigationController alloc] initWithRootViewController:editorViewController]; editorNavigationController.modalPresentationStyle = UIModalPresentationPageSheet; [navigationController presentViewController:editorNavigationController animated:YES completion:nil];
当显示这个视图控制器时,导航栏中的按钮是紫色的,我假设它是从窗口的色调中拾取的,这就是我想要的.
UINavigationController *previewNavigationController = [[UINavigationController alloc]initWithRootViewController:myPreviewViewController]; [owningViewController presentViewController:previewNavigationController animated:YES completion:nil];
我遇到的问题是,当@L_434_3@myPreviewController时,导航栏中的按钮是灰色的.我尝试在新的导航控制器上恢复颜色:
previewNavigationController.navigationBar.TintColor = [UIColor colorWithRed:123/255.0 green:26/255.0 blue:69/255.0 alpha:1];
但没有任何快乐.
如何让按钮具有正确的颜色?我可以让新的导航控制器自动拾取窗口色调颜色,还是必须明确设置它?这与将第二个导航控制器显示在使用UIModalPresentationPageSheet的顶部的导航控制器有关吗?
任何帮助非常感谢!谢谢,
保罗
以上是大佬教程为你收集整理的ios – 导航栏上的按钮不会拾取窗口色调全部内容,希望文章能够帮你解决ios – 导航栏上的按钮不会拾取窗口色调所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。