FileBSImagePickerViewController.swift 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // FileBSImagePickerViewController.swift
  3. // O2Platform
  4. //
  5. // Created by 刘振兴 on 16/9/22.
  6. // Copyright © 2016年 zoneland. All rights reserved.
  7. //
  8. import UIKit
  9. import BSImagePicker
  10. class FileBSImagePickerViewController: BSImagePickerViewController {
  11. override func viewDidLoad() {
  12. super.viewDidLoad()
  13. self.navigationBar.isTranslucent = false
  14. self.navigationBar.barTintColor = navbar_barTint_color
  15. self.navigationBar.tintColor = navbar_tint_color
  16. self.navigationBar.titleTextAttributes = [NSAttributedString.Key.font:navbar_text_font,NSAttributedString.Key.foregroundColor:navbar_tint_color]
  17. self.albumButton.setTitleColor(navbar_tint_color, for: .normal)
  18. self.settings.maxNumberOfSelections = 1
  19. self.settings.takePhotos = true
  20. //隐藏返回按钮文字
  21. let barItem = UIBarButtonItem.appearance()
  22. let offset = UIOffset(horizontal: -200, vertical: 0)
  23. barItem.setBackButtonTitlePositionAdjustment(offset, for: .default)
  24. barItem.setTitleTextAttributes([NSAttributedString.Key.font:navbar_item_font,NSAttributedString.Key.foregroundColor:navbar_tint_color], for:UIControl.State())
  25. // Do any additional setup after loading the view.
  26. }
  27. override var preferredStatusBarStyle : UIStatusBarStyle {
  28. return .lightContent
  29. }
  30. }