我想改变它的颜色"取消"从照片库中选择图像时显示按钮和其他按钮。我怎样才能做到这一点?
var imagePicker = UIImagePickerController()
imagePicker.delegate = sender as? protocol<UIImagePickerControllerDelegate, UINavigationControllerDelegate>
imagePicker.sourceType = UIImagePickerControllerSourceType.PhotoLibrary
imagePicker.allowsEditing = true
sender.navigationController?.presentViewController(imagePicker, animated: true, completion: nil)
答案 0 :(得分:2)
在AppDelegate.m
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
在AppDelegate.swift
中,application(_:didFinishLaunchingWithOptions:)
我提出以下内容:
UINavigationBar.appearance().tintColor = UIColor.whiteColor()
如果要更改导航栏的文本颜色,请使用以下代码:
UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName : UIColor.whiteColor()]