FileBSImagePickerViewController.swift 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. var defaultmaxNumberOfSelections = 1
  12. var defaultTakePhotos = true
  13. override func viewDidLoad() {
  14. super.viewDidLoad()
  15. self.navigationBar.isTranslucent = false
  16. self.navigationBar.barTintColor = navbar_barTint_color
  17. self.navigationBar.tintColor = navbar_tint_color
  18. self.navigationBar.titleTextAttributes = [NSAttributedString.Key.font:navbar_text_font,NSAttributedString.Key.foregroundColor:navbar_tint_color]
  19. self.albumButton.setTitleColor(navbar_tint_color, for: .normal)
  20. self.settings.maxNumberOfSelections = defaultmaxNumberOfSelections
  21. self.settings.takePhotos = defaultTakePhotos
  22. //隐藏返回按钮文字
  23. let barItem = UIBarButtonItem.appearance()
  24. let offset = UIOffset(horizontal: -200, vertical: 0)
  25. barItem.setBackButtonTitlePositionAdjustment(offset, for: .default)
  26. barItem.setTitleTextAttributes([NSAttributedString.Key.font:navbar_item_font,NSAttributedString.Key.foregroundColor:navbar_tint_color], for:UIControl.State())
  27. // Do any additional setup after loading the view.
  28. }
  29. override var preferredStatusBarStyle : UIStatusBarStyle {
  30. return .lightContent
  31. }
  32. }