FileBSImagePickerViewController.swift 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. struct FileBSImagePickerViewController {
  11. func bsImagePicker() -> BSImagePicker.ImagePickerController {
  12. let picker = BSImagePicker.ImagePickerController()
  13. picker.albumButton.setTitleColor(navbar_tint_color, for: .normal)
  14. picker.settings.selection.max = 1
  15. picker.settings.theme.selectionStyle = .checked
  16. picker.settings.selection.unselectOnReachingMax = true
  17. picker.navigationBar.isTranslucent = false
  18. picker.navigationBar.barTintColor = navbar_barTint_color
  19. picker.navigationBar.tintColor = navbar_tint_color
  20. picker.navigationBar.titleTextAttributes = [NSAttributedString.Key.font:navbar_text_font,NSAttributedString.Key.foregroundColor:navbar_tint_color]
  21. return picker
  22. }
  23. }
  24. //class FileBSImagePickerViewController: BSImagePicker.ImagePickerController {
  25. //
  26. // var defaultmaxNumberOfSelections = 1
  27. // var defaultTakePhotos = true
  28. // override func viewDidLoad() {
  29. // super.viewDidLoad()
  30. // self.navigationBar.isTranslucent = false
  31. // self.navigationBar.barTintColor = navbar_barTint_color
  32. // self.navigationBar.tintColor = navbar_tint_color
  33. // self.navigationBar.titleTextAttributes = [NSAttributedString.Key.font:navbar_text_font,NSAttributedString.Key.foregroundColor:navbar_tint_color]
  34. //
  35. //// self.albumButton.setTitleColor(navbar_tint_color, for: .normal)
  36. //// self.settings.maxNumberOfSelections = defaultmaxNumberOfSelections
  37. //// self.settings.takePhotos = defaultTakePhotos
  38. //
  39. //
  40. //
  41. // //隐藏返回按钮文字
  42. // let barItem = UIBarButtonItem.appearance()
  43. // let offset = UIOffset(horizontal: -200, vertical: 0)
  44. // barItem.setBackButtonTitlePositionAdjustment(offset, for: .default)
  45. // barItem.setTitleTextAttributes([NSAttributedString.Key.font:navbar_item_font,NSAttributedString.Key.foregroundColor:navbar_tint_color], for:UIControl.State())
  46. //
  47. // // Do any additional setup after loading the view.
  48. // }
  49. //
  50. // override var preferredStatusBarStyle : UIStatusBarStyle {
  51. // return .lightContent
  52. // }
  53. //
  54. //
  55. //
  56. //}