
这是我当前的代码:
UINavigationbar.my_appearanceWhenContainedIn(MFMailComposeVIEwController).barTintcolor = UIcolor.blackcolor()
这是建议here.我也试过这个:
activityVC.navigationController?.navigationbar.tintcolor = UIcolorFromrGB(0x0096FF) activityVC.navigationController?.navigationbar.barTintcolor = UIcolor.whitecolor()
我也想改变状态栏颜色.
任何人都有什么想法?
更新:
我修复了按钮和标题的导航栏问题,但仍在寻找状态栏的解决方案.这样做不行:
self.presentVIEwController(activityVC,animated: true,completion: { () in UIApplication.sharedApplication().setStatusbarStyle(UIStatusbarStyle.lightContent,animated: true) })解决方法 您可以对MFMailVIEwController进行子类化,并覆盖其vIEwWillAppear方法 overrIDe func vIEwWillAppear(animated: Bool) { super.vIEwWillAppear(animated) UIApplication.sharedApplication().statusbarStyle = UIStatusbarStyle.lightContent self.navigationController.navigationbar.translucent = false self.navigationController.navigationbar.opaque = false self.navigationController.navigationbar.barTintcolor = UIcolor.bluecolor()} 由于只有当MFMailComposeVIEwController处于活动状态时,才希望状态栏为lightcontent,所以您不应该将
UIApplication.sharedApplication().statusbarStyle = UIStatusbarStyle.lightContent
进入你的应用程序代表dIDFinishLoading.这将为您的整个应用程序设置lightContent.
总结以上是内存溢出为你收集整理的ios – 通过UIActivityViewController更改MFMailComposeViewController中的状态栏颜色全部内容,希望文章能够帮你解决ios – 通过UIActivityViewController更改MFMailComposeViewController中的状态栏颜色所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)