3

I need it to be Helvetica Neue Light. Here is how I create the controller

let picker: UIImagePickerController = UIImagePickerController()
picker.delegate = self
picker.allowsEditing = false
picker.navigationBar.tintColor = UIColor.whiteColor()
picker.sourceType = .PhotoLibrary
picker.navigationController?.navigationBar.tintColor = UIColor.blueColor()

self.presentViewController(picker, animated: true, completion: { _ in })
ConnorB
  • 406
  • 5
  • 16

1 Answers1

2

This is how you do it:

picker.navigationBar.titleTextAttributes =
    [NSForegroundColorAttributeName: UIColor.redColor(),
        NSFontAttributeName: UIFont.init(name: "Helvetica", size: 21)!]

Also, a small problem with your code: UIImagePickerController derived from UINavigationController, and picker.navigationController? is always nil in your code above.

Yuchen
  • 30,852
  • 26
  • 164
  • 234
  • Do you know how to access the library back button through my code – ConnorB Mar 06 '16 at 18:45
  • I need to change it to just the back arrow – ConnorB Mar 06 '16 at 18:46
  • @ConnorB, as far as I know, there is no explicitly way to change bar button to a back button with the left arrow if that is what you are asking for. That back button is automatically added if you are using a navigation controller and push a new view controller to a navigation stack. – Yuchen Mar 06 '16 at 18:51
  • Well How can I change the back bar button title – ConnorB Mar 06 '16 at 18:54
  • If you are only wanting to change the title, this is how you do it: http://stackoverflow.com/questions/1449339/how-do-i-change-the-title-of-the-back-button-on-a-navigation-bar – Yuchen Mar 06 '16 at 19:08
  • You can change the back button by setting the picker delegate, which is also a UINavigationControllerDelegate. Then you can set the left bar button item when the navigation controller will show the UIImagePicker – Johanneke Jun 13 '16 at 14:43