فهرست منبع

1.合成闪音v1.3.0

wenweiwei 3 سال پیش
والد
کامیت
fa2edacff0
85فایلهای تغییر یافته به همراه1753 افزوده شده و 181 حذف شده
  1. 1 1
      BFCommonKit.podspec
  2. 0 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/Contents.json
  3. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedClosed.imageset/Contents.json
  4. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedClosed.imageset/customSpeedClosed@2x.png
  5. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedClosed.imageset/customSpeedClosed@3x.png
  6. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedFast.imageset/Contents.json
  7. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedFast.imageset/customSpeedFast@2x.png
  8. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedFast.imageset/customSpeedFast@3x.png
  9. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedSlow.imageset/Contents.json
  10. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedSlow.imageset/customSpeedSlow@2x.png
  11. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedSlow.imageset/customSpeedSlow@3x.png
  12. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_blanc_back.imageset/Contents.json
  13. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_blanc_back.imageset/icon_blanc_back@2x.png
  14. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_blanc_back.imageset/icon_blanc_back@3x.png
  15. 0 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_detail_back.imageset/Contents.json
  16. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_detail_back.imageset/icon_detail_back@2x.png
  17. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_detail_back.imageset/icon_detail_back@3x.png
  18. 21 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_search_delete.imageset/Contents.json
  19. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_search_delete.imageset/icon_search_delete@2x.png
  20. 21 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_search_s.imageset/Contents.json
  21. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_search_s.imageset/icon_search_s@2x.png
  22. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/jumpPoint_h.imageset/Contents.json
  23. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/jumpPoint_h.imageset/jumpPoint_h@2x.png
  24. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/jumpPoint_h.imageset/jumpPoint_h@3x.png
  25. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/jumpPoint_n.imageset/Contents.json
  26. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/jumpPoint_n.imageset/jumpPoint_n@2x.png
  27. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/jumpPoint_n.imageset/jumpPoint_n@3x.png
  28. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/loading.imageset/Contents.json
  29. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/loading.imageset/loading@2x.png
  30. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/loading.imageset/loading@3x.png
  31. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicEditerBtn_h.imageset/Contents.json
  32. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicEditerBtn_h.imageset/musicEditerBtn_h@2x.png
  33. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicEditerBtn_h.imageset/musicEditerBtn_h@3x.png
  34. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicEditerBtn_n.imageset/Contents.json
  35. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicEditerBtn_n.imageset/musicEditerBtn_n@2x.png
  36. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicEditerBtn_n.imageset/musicEditerBtn_n@3x.png
  37. 21 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicSearch.imageset/Contents.json
  38. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicSearch.imageset/musicSearch@2x.png
  39. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/onlyMusic_h.imageset/Contents.json
  40. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/onlyMusic_h.imageset/onlyMusic_h@2x.png
  41. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/onlyMusic_h.imageset/onlyMusic_h@3x.png
  42. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/onlyMusic_n.imageset/Contents.json
  43. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/onlyMusic_n.imageset/onlyMusic_n@2x.png
  44. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/onlyMusic_n.imageset/onlyMusic_n@3x.png
  45. 0 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/placehold_image.imageset/Contents.json
  46. 0 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/placehold_image.imageset/placehold_image@2x.png
  47. 0 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/placehold_image.imageset/placehold_image@3x.png
  48. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/pointEditerBtn_h.imageset/Contents.json
  49. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/pointEditerBtn_h.imageset/pointEditerBtn_h@2x.png
  50. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/pointEditerBtn_h.imageset/pointEditerBtn_h@3x.png
  51. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/pointEditerBtn_n.imageset/Contents.json
  52. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/pointEditerBtn_n.imageset/pointEditerBtn_n@2x.png
  53. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/pointEditerBtn_n.imageset/pointEditerBtn_n@3x.png
  54. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/sliderTHBPin.imageset/Contents.json
  55. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/sliderTHBPin.imageset/sliderTHBPin@2x.png
  56. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/sliderTHBPin.imageset/sliderTHBPin@3x.png
  57. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/speedstuck_h.imageset/Contents.json
  58. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/speedstuck_h.imageset/speedstuck_h@2x.png
  59. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/speedstuck_h.imageset/speedstuck_h@3x.png
  60. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/speedstuck_n.imageset/Contents.json
  61. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/speedstuck_n.imageset/speedstuck_n@2x.png
  62. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/speedstuck_n.imageset/speedstuck_n@3x.png
  63. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/stuckPoint_music_pause.imageset/Contents.json
  64. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/stuckPoint_music_pause.imageset/stuckPoint_music_pause@2x.png
  65. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/stuckPoint_music_pause.imageset/stuckPoint_music_pause@3x.png
  66. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/stuckPoint_music_selected.imageset/Contents.json
  67. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/stuckPoint_music_selected.imageset/stuckPoint_music_selected@2x.png
  68. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/stuckPoint_music_selected.imageset/stuckPoint_music_selected@3x.png
  69. 22 0
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/videomk_music_default.imageset/Contents.json
  70. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/videomk_music_default.imageset/videomk_music_default@2x.png
  71. BIN
      BFCommonKit/Assets/Resources/BFCommonKit.xcassets/videomk_music_default.imageset/videomk_music_default@3x.png
  72. BIN
      BFCommonKit/Assets/Resources/Material.xcassets/icon_detail_back.imageset/icon_detail_back@2x.png
  73. BIN
      BFCommonKit/Assets/Resources/Material.xcassets/icon_detail_back.imageset/icon_detail_back@3x.png
  74. 1 1
      BFCommonKit/Classes/BFBase/Controller/PQBaseWebViewController.swift
  75. 1 1
      BFCommonKit/Classes/BFBase/View/PQLoadingHUB.swift
  76. 20 13
      BFCommonKit/Classes/BFBase/View/PQRemindView.swift
  77. 1 1
      BFCommonKit/Classes/BFCategorys/BFBundle+Ext.swift
  78. 113 0
      BFCommonKit/Classes/BFCategorys/BFUIButton+ext.swift
  79. 58 11
      BFCommonKit/Classes/BFCategorys/BFUIImage+Ext.swift
  80. 201 0
      BFCommonKit/Classes/BFCategorys/UIImage+NXCategory.h
  81. 642 0
      BFCommonKit/Classes/BFCategorys/UIImage+NXCategory.m
  82. 1 17
      BFCommonKit/Classes/BFConfig/PQBFConfig.swift
  83. 218 125
      BFCommonKit/Classes/BFEnums/Enums.swift
  84. 6 2
      BFCommonKit/Classes/BFUtility/PQCommonMethodUtil.swift
  85. 9 9
      Example/Podfile.lock

+ 1 - 1
BFCommonKit.podspec

@@ -8,7 +8,7 @@
 
 Pod::Spec.new do |s|
   s.name             = 'BFCommonKit'
-  s.version          = '1.4.4'
+  s.version          = '1.4.6'
   s.summary          = 'A short description of BFCommonKit.'
   s.swift_version    = '5.0'
 # This description is used to generate tags and improve search results.

+ 0 - 0
BFCommonKit/Assets/Resources/Material.xcassets/Contents.json → BFCommonKit/Assets/Resources/BFCommonKit.xcassets/Contents.json


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedClosed.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "customSpeedClosed@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "customSpeedClosed@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedClosed.imageset/customSpeedClosed@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedClosed.imageset/customSpeedClosed@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedFast.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "customSpeedFast@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "customSpeedFast@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedFast.imageset/customSpeedFast@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedFast.imageset/customSpeedFast@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedSlow.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "customSpeedSlow@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "customSpeedSlow@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedSlow.imageset/customSpeedSlow@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/customSpeedSlow.imageset/customSpeedSlow@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_blanc_back.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "icon_blanc_back@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "icon_blanc_back@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_blanc_back.imageset/icon_blanc_back@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_blanc_back.imageset/icon_blanc_back@3x.png


+ 0 - 0
BFCommonKit/Assets/Resources/Material.xcassets/icon_detail_back.imageset/Contents.json → BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_detail_back.imageset/Contents.json


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_detail_back.imageset/icon_detail_back@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_detail_back.imageset/icon_detail_back@3x.png


+ 21 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_search_delete.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "icon_search_delete@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_search_delete.imageset/icon_search_delete@2x.png


+ 21 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_search_s.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "icon_search_s@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/icon_search_s.imageset/icon_search_s@2x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/jumpPoint_h.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "jumpPoint_h@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "jumpPoint_h@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/jumpPoint_h.imageset/jumpPoint_h@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/jumpPoint_h.imageset/jumpPoint_h@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/jumpPoint_n.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "jumpPoint_n@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "jumpPoint_n@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/jumpPoint_n.imageset/jumpPoint_n@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/jumpPoint_n.imageset/jumpPoint_n@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/loading.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "loading@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "loading@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/loading.imageset/loading@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/loading.imageset/loading@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicEditerBtn_h.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "musicEditerBtn_h@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "musicEditerBtn_h@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicEditerBtn_h.imageset/musicEditerBtn_h@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicEditerBtn_h.imageset/musicEditerBtn_h@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicEditerBtn_n.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "musicEditerBtn_n@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "musicEditerBtn_n@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicEditerBtn_n.imageset/musicEditerBtn_n@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicEditerBtn_n.imageset/musicEditerBtn_n@3x.png


+ 21 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicSearch.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "musicSearch@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/musicSearch.imageset/musicSearch@2x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/onlyMusic_h.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "onlyMusic_h@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "onlyMusic_h@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/onlyMusic_h.imageset/onlyMusic_h@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/onlyMusic_h.imageset/onlyMusic_h@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/onlyMusic_n.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "onlyMusic_n@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "onlyMusic_n@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/onlyMusic_n.imageset/onlyMusic_n@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/onlyMusic_n.imageset/onlyMusic_n@3x.png


+ 0 - 0
BFCommonKit/Assets/Resources/Material.xcassets/placehold_image.imageset/Contents.json → BFCommonKit/Assets/Resources/BFCommonKit.xcassets/placehold_image.imageset/Contents.json


+ 0 - 0
BFCommonKit/Assets/Resources/Material.xcassets/placehold_image.imageset/placehold_image@2x.png → BFCommonKit/Assets/Resources/BFCommonKit.xcassets/placehold_image.imageset/placehold_image@2x.png


+ 0 - 0
BFCommonKit/Assets/Resources/Material.xcassets/placehold_image.imageset/placehold_image@3x.png → BFCommonKit/Assets/Resources/BFCommonKit.xcassets/placehold_image.imageset/placehold_image@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/pointEditerBtn_h.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "pointEditerBtn_h@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "pointEditerBtn_h@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/pointEditerBtn_h.imageset/pointEditerBtn_h@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/pointEditerBtn_h.imageset/pointEditerBtn_h@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/pointEditerBtn_n.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "pointEditerBtn_n@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "pointEditerBtn_n@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/pointEditerBtn_n.imageset/pointEditerBtn_n@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/pointEditerBtn_n.imageset/pointEditerBtn_n@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/sliderTHBPin.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "sliderTHBPin@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "sliderTHBPin@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/sliderTHBPin.imageset/sliderTHBPin@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/sliderTHBPin.imageset/sliderTHBPin@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/speedstuck_h.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "speedstuck_h@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "speedstuck_h@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/speedstuck_h.imageset/speedstuck_h@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/speedstuck_h.imageset/speedstuck_h@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/speedstuck_n.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "speedstuck_n@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "speedstuck_n@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/speedstuck_n.imageset/speedstuck_n@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/speedstuck_n.imageset/speedstuck_n@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/stuckPoint_music_pause.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "stuckPoint_music_pause@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "stuckPoint_music_pause@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/stuckPoint_music_pause.imageset/stuckPoint_music_pause@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/stuckPoint_music_pause.imageset/stuckPoint_music_pause@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/stuckPoint_music_selected.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "stuckPoint_music_selected@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "stuckPoint_music_selected@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/stuckPoint_music_selected.imageset/stuckPoint_music_selected@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/stuckPoint_music_selected.imageset/stuckPoint_music_selected@3x.png


+ 22 - 0
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/videomk_music_default.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "videomk_music_default@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "videomk_music_default@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/videomk_music_default.imageset/videomk_music_default@2x.png


BIN
BFCommonKit/Assets/Resources/BFCommonKit.xcassets/videomk_music_default.imageset/videomk_music_default@3x.png


BIN
BFCommonKit/Assets/Resources/Material.xcassets/icon_detail_back.imageset/icon_detail_back@2x.png


BIN
BFCommonKit/Assets/Resources/Material.xcassets/icon_detail_back.imageset/icon_detail_back@3x.png


+ 1 - 1
BFCommonKit/Classes/BFBase/Controller/PQBaseWebViewController.swift

@@ -106,7 +106,7 @@ open class PQBaseWebViewController: PQBaseViewController {
         view.addSubview(emptyRemindView)
         leftButton(imageName: "icon_blanc_back")
         backButton?.tintColor = UIColor.black
-        backButton?.setImage(UIImage(named: "icon_blanc_back")?.withRenderingMode(.alwaysTemplate), for: .normal)
+//        backButton?.setImage(UIImage(named: "icon_blanc_back")?.withRenderingMode(.alwaysTemplate), for: .normal)
         navHeadImageView?.backgroundColor = UIColor.white
         navHeadImageView?.addSubview(deleteBtn)
         deleteBtn.frame.origin.x = (backButton?.frame.maxX ?? 0)

+ 1 - 1
BFCommonKit/Classes/BFBase/View/PQLoadingHUB.swift

@@ -56,7 +56,7 @@ public class PQLoadingHUBView: UIView {
         super.layoutSubviews()
         // 334 * 307
         let imageW: CGFloat = 67
-        let imageH: CGFloat = 62
+        let imageH: CGFloat = 67
         loadingImage.frame = CGRect(x: (frame.width - imageW) / 2, y: (frame.height - imageW) / 2, width: imageW, height: imageH)
     }
 

+ 20 - 13
BFCommonKit/Classes/BFBase/View/PQRemindView.swift

@@ -148,25 +148,25 @@ open class PQRemindView: UIView {
             make.top.equalTo(contentView).offset(cDefaultMargin * 2)
         }
         contentLab.snp.makeConstraints { make in
-            make.top.equalTo(titleLab.snp_bottom).offset(summH > 0 ? cDefaultMargin : 0)
+            make.top.equalTo(titleLab.snp.bottom).offset(summH > 0 ? cDefaultMargin : 0)
             make.left.right.equalTo(titleLab)
             make.height.equalTo(summH)
         }
         if isBanned {
             let btnW: CGFloat = (cScreenWidth - 1 - cDefaultMargin * 8) / 2
             verticalLine.snp.makeConstraints { make in
-                make.top.equalTo(contentLab.snp_bottom).offset(cDefaultMargin)
+                make.top.equalTo(contentLab.snp.bottom).offset(cDefaultMargin)
                 make.height.equalTo(1)
                 make.left.width.equalToSuperview()
             }
             cancelBtn.snp.makeConstraints { make in
                 make.left.equalToSuperview()
-                make.top.equalTo(verticalLine.snp_bottom)
+                make.top.equalTo(verticalLine.snp.bottom)
                 make.width.equalTo(btnW)
                 make.bottom.equalTo(contentView)
             }
             horizonLine.snp.makeConstraints { make in
-                make.left.equalTo(cancelBtn.snp_right)
+                make.left.equalTo(cancelBtn.snp.right)
                 make.height.top.equalTo(cancelBtn)
                 make.width.equalTo(1)
             }
@@ -182,7 +182,7 @@ open class PQRemindView: UIView {
                 make.bottom.equalTo(contentView).offset(-cDefaultMargin)
             }
             cancelBtn.snp.makeConstraints { make in
-                make.right.equalTo(confirmBtn.snp_left).offset(-cDefaultMargin)
+                make.right.equalTo(confirmBtn.snp.left).offset(-cDefaultMargin)
                 make.height.equalTo(cDefaultMargin * 4)
                 make.width.equalTo(cDefaultMargin * 6)
                 make.bottom.equalTo(confirmBtn)
@@ -205,6 +205,7 @@ open class PQEmptyRemindView: UIView {
     // 是否没网提示
     public var isNetLost:Bool = false {
         didSet {
+            
             addData()
             addLayout()
         }
@@ -373,7 +374,7 @@ extension PQEmptyRemindView {
         }
 //        shimmeringView.snp.makeConstraints { make in
 //            make.left.right.equalTo(self)
-//            make.top.equalTo(imageView.snp_bottom).offset(cDefaultMargin)
+//            make.top.equalTo(imageView.snp.bottom).offset(cDefaultMargin)
 //        }
         remindLab.snp.remakeConstraints { make in
             make.left.right.equalToSuperview()
@@ -458,25 +459,25 @@ public class PQUploadRemindView: PQRemindView {
             make.top.equalTo(contentView).offset(titleH == 0 ? 0 : cDefaultMargin * 2)
         }
         contentLab.snp.makeConstraints { make in
-            make.top.equalTo(titleLab.snp_bottom).offset(cDefaultMargin)
+            make.top.equalTo(titleLab.snp.bottom).offset(cDefaultMargin)
             make.left.right.equalTo(titleLab)
             make.height.equalTo(summH)
         }
         if canMoreOpration {
             let btnW: CGFloat = (cScreenWidth - 1 - cDefaultMargin * 8) / 2
             verticalLine.snp.makeConstraints { make in
-                make.top.equalTo(contentLab.snp_bottom).offset(cDefaultMargin)
+                make.top.equalTo(contentLab.snp.bottom).offset(cDefaultMargin)
                 make.height.equalTo(1)
                 make.left.width.equalToSuperview()
             }
             cancelBtn.snp.makeConstraints { make in
                 make.left.equalToSuperview()
-                make.top.equalTo(verticalLine.snp_bottom)
+                make.top.equalTo(verticalLine.snp.bottom)
                 make.width.equalTo(btnW)
                 make.bottom.equalTo(contentView)
             }
             horizonLine.snp.makeConstraints { make in
-                make.left.equalTo(cancelBtn.snp_right)
+                make.left.equalTo(cancelBtn.snp.right)
                 make.height.top.equalTo(cancelBtn)
                 make.width.equalTo(1)
             }
@@ -486,13 +487,13 @@ public class PQUploadRemindView: PQRemindView {
             }
         } else {
             verticalLine.snp.makeConstraints { make in
-                make.top.equalTo(contentLab.snp_bottom).offset(cDefaultMargin)
+                make.top.equalTo(contentLab.snp.bottom).offset(cDefaultMargin)
                 make.height.equalTo(1)
                 make.left.width.equalToSuperview()
             }
             confirmBtn.snp.makeConstraints { make in
                 make.right.left.equalTo(titleLab)
-                make.top.equalTo(verticalLine.snp_bottom)
+                make.top.equalTo(verticalLine.snp.bottom)
                 make.bottom.equalTo(contentView)
             }
         }
@@ -516,7 +517,7 @@ public class PQUploadRemindView: PQRemindView {
     ///   - confirmTitle: <#confirmTitle description#>
     ///   - remindHandle: <#remindHandle description#>
     /// - Returns: <#description#>
-    class public func showUploadRemindView(title: String?, attributedTitle: NSAttributedString? = nil, summary: String, canMoreOpration: Bool = false, confirmTitle: String?, cancelTitle: String? = nil, cancelColor: UIColor? = nil, remindHandle: @escaping (_ sender: UIButton, _ baseModel: PQBaseModel?) -> Void) {
+    class public func showUploadRemindView(title: String?, attributedTitle: NSAttributedString? = nil, summary: String, canMoreOpration: Bool = false, confirmTitle: String?, cancelTitle: String? = nil, cancelColor: UIColor? = nil,confirmColor: UIColor? = nil, remindHandle: @escaping (_ sender: UIButton, _ baseModel: PQBaseModel?) -> Void) {
         if UIApplication.shared.keyWindow?.viewWithTag(cUploadViewRemindTag) != nil {
             UIApplication.shared.keyWindow?.viewWithTag(cUploadViewRemindTag)?.removeFromSuperview()
         }
@@ -543,8 +544,14 @@ public class PQUploadRemindView: PQRemindView {
         remindView.remindBlock = { sender, baseModel in
             remindHandle(sender, baseModel)
         }
+
         remindView.tag = cUploadViewRemindTag
         UIApplication.shared.keyWindow?.addSubview(remindView)
         remindView.remindData = remindData
+        
+        if(confirmColor != nil){
+            remindView.confirmBtn.setTitleColor(confirmColor, for: .normal)
+        }
+      
     }
 }

+ 1 - 1
BFCommonKit/Classes/BFCategorys/BFBundle+Ext.swift

@@ -18,7 +18,7 @@ public extension Bundle {
         var bundleURL = Bundle.main.url(forResource: "Frameworks", withExtension: nil)
         bundleURL = bundleURL?.appendingPathComponent("BFCommonKit").appendingPathExtension("framework")
         let bundle: Bundle = Bundle(url: bundleURL!)!
-        return bundle.url(forResource: "BFCommon_Resources", withExtension: "bundle")!
+        return bundle.url(forResource: "BFCommonKit_Resources", withExtension: "bundle")!
     }
 
     // bf main bundle

+ 113 - 0
BFCommonKit/Classes/BFCategorys/BFUIButton+ext.swift

@@ -61,3 +61,116 @@ public extension UIButton {
         self.imageEdgeInsets = imageEdgeInsets
     }
 }
+
+/*
+   e.g.
+ let button = UIButton(frame: CGRect(x: 0, y: 300, width: 100, height: 22))
+ button.setTitle("按钮", for: .normal)
+ button.setTitleColor(.black, for: .normal)
+ button.eventInterval = 2.0  //  按的时间间隔, 设置为0的时候就是可以反复点击
+ view.addSubview(button)
+ 
+ */
+// MARK: - 按钮的反复点击问题 交换方法
+extension UIButton {
+
+    /// 对外交换方法的方法 AppDelegate Launch中使用
+    public  static func methodExchange() {
+        DispatchQueue.once(token: "UIButton") {
+            let originalSelector = Selector.sysFunc
+            let swizzledSelector = Selector.myFunc
+            changeMethod(originalSelector, swizzledSelector, self)
+        }
+    }
+    
+    
+    /// Runtime方法交换
+    ///
+    /// - Parameters:
+    ///   - original: 原方法
+    ///   - swizzled: 交换方法
+    ///   - object: 对象
+    public static func changeMethod(_ original: Selector, _ swizzled: Selector, _ object: AnyClass) -> () {
+        
+        guard let originalMethod = class_getInstanceMethod(object, original),
+              let swizzledMethod = class_getInstanceMethod(object, swizzled) else {
+            return
+        }
+        
+        let didAddMethod = class_addMethod(object, original, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod))
+        if didAddMethod {
+            class_replaceMethod(object, swizzled, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod))
+        } else {
+            method_exchangeImplementations(originalMethod, swizzledMethod)
+        }
+    }
+    
+    
+    /// 结构体静态key
+    public struct UIButtonKey {
+        static var isEventUnavailableKey = "isEventUnavailableKey"
+        static var eventIntervalKey = "eventIntervalKey"
+    }
+    
+    /// 触发事件的间隔
+    public var eventInterval: TimeInterval {
+        get {
+            return (objc_getAssociatedObject(self, &UIButtonKey.eventIntervalKey) as? TimeInterval) ?? 0
+        }
+        set {
+            objc_setAssociatedObject(self, &UIButtonKey.eventIntervalKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
+        }
+    }
+    
+    /// 是否可以触发事件
+    fileprivate var isEventUnavailable: Bool {
+        get {
+            return (objc_getAssociatedObject(self, &UIButtonKey.isEventUnavailableKey) as? Bool) ?? false
+        }
+        set {
+            objc_setAssociatedObject(self, &UIButtonKey.isEventUnavailableKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
+        }
+    }
+    
+    /// 手写的set方法
+    ///
+    /// - Parameter isEventUnavailable: 事件是否可用
+    @objc private func setIsEventUnavailable(_ isEventUnavailable: Bool) {
+        self.isEventUnavailable = isEventUnavailable
+    }
+    
+    /// mySendAction
+    @objc fileprivate func mySendAction(_ action: Selector, to target: Any?, for event: UIEvent?) {
+        print("交换了按钮事件的方法")
+        
+        if isEventUnavailable == false {
+            isEventUnavailable = true
+            mySendAction(action, to: target, for: event)
+            perform(#selector(setIsEventUnavailable(_: )), with: false, afterDelay: eventInterval)
+        }
+    }
+}
+
+fileprivate extension Selector {
+    static let sysFunc = #selector(UIButton.sendAction(_:to:for:))
+    static let myFunc = #selector(UIButton.mySendAction(_:to:for:))
+}
+
+extension DispatchQueue {
+    private static var onceTracker = [String]()
+    
+    open class func once(token: String, block:() -> ()) {
+        //注意defer作用域,调用顺序——即一个作用域结束,该作用域中的defer语句自下而上调用。
+        objc_sync_enter(self)
+        defer {
+            print("线程锁退出")
+            objc_sync_exit(self)
+        }
+        
+        if onceTracker.contains(token) {
+            return
+        }
+        onceTracker.append(token)
+        block()
+    }
+}

+ 58 - 11
BFCommonKit/Classes/BFCategorys/BFUIImage+Ext.swift

@@ -8,19 +8,44 @@
 
 import Foundation
 
-// MARK: - 刷新控件类型
-
-/// 刷新控件类型
-public enum moveDirection {
-    case moveDirectionNormal
-    case moveDirectionUp
-    case moveDirectionDown
-    case moveDirectionRight
-    case moveDirectionLeft
-}
-
 public extension UIImage {
     // 从BFframwork bundle 中取图片
+    static func mc_loadImage(_ imageName: String, from bundleName: String, in podName: String) -> UIImage? {
+            
+            var associateBundleURL = Bundle.main.url(forResource: "Frameworks", withExtension: nil)
+            associateBundleURL = associateBundleURL?.appendingPathComponent(podName)
+            associateBundleURL = associateBundleURL?.appendingPathExtension("framework")
+            
+            
+            if associateBundleURL == nil {
+                print("获取bundle失败")
+                return nil
+            }
+            
+            let associateBunle = Bundle.init(url: associateBundleURL!)
+            associateBundleURL = associateBunle?.url(forResource: bundleName, withExtension: "bundle")
+            
+            if associateBundleURL != nil {
+                let bundle = Bundle.init(url: associateBundleURL!)
+                let scale = Int(UIScreen.main.scale)
+                
+                // 适配2x还是3x图片
+                let name = imageName + "@" + String(scale) + "x"
+                let path = bundle?.path(forResource: name, ofType: "png")
+                
+                if path == nil {
+                    print("获取bundle失败")
+                    return nil
+                }
+                let image1 = UIImage.init(contentsOfFile: path!)
+                return image1
+
+            } else {
+                return nil
+            }
+        }
+    
+    
     func BF_Image(named: String) -> UIImage {
         let image: UIImage = UIImage(named: named, in: Bundle().BF_mainbundle(), compatibleWith: nil) ?? UIImage()
         return image
@@ -246,4 +271,26 @@ public extension UIImage {
         UIGraphicsEndImageContext()
         return tintedImage
     }
+    
+    /// 保存图片文件到指定目录, 如果目录已经存在会先删除老文件
+    /// - Parameters:
+    ///   - currentImage: 图片数据
+    ///   - persent: 质量
+    ///   - outFilePath: 输出目录
+    class func saveImage(currentImage: UIImage,outFilePath: String) {
+        // 文件存在先删除老文件
+        if FileManager.default.fileExists(atPath: outFilePath) {
+            do {
+                try FileManager.default.removeItem(at: NSURL.fileURL(withPath: outFilePath))
+            } catch {
+                BFLog(message: "删除文件出错 == \(error) \(outFilePath)")
+            }
+        }
+        
+        if let imageData = currentImage.pngData() {
+            try? imageData.write(to: URL(fileURLWithPath: outFilePath))
+            print("保存图片成功到:filePath=\(outFilePath)")
+        }
+    }
+
 }

+ 201 - 0
BFCommonKit/Classes/BFCategorys/UIImage+NXCategory.h

@@ -0,0 +1,201 @@
+//
+//  UIImage+UIImage_NXCategory.h
+//  AKImovie
+//
+//  Created by AK on 16/2/21.
+//  Copyright © 2016年 ak. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef NS_ENUM(NSInteger, NXCropImageStyle) {
+    NXCropImageStyleRight = 0,               // 右半部分
+    NXCropImageStyleCenter = 1,              // 中间部分
+    NXCropImageStyleLeft = 2,                // 左半部分
+    NXCropImageStyleRightOneOfThird = 3,     // 右侧三分之一部分
+    NXCropImageStyleCenterOneOfThird = 4,    // 中间三分之一部分
+    NXCropImageStyleLeftOneOfThird = 5,      // 左侧三分之一部分
+    NXCropImageStyleRightQuarter = 6,        // 右侧四分之一部分
+    NXCropImageStyleCenterRightQuarter = 7,  // 中间右侧四分之一部分
+    NXCropImageStyleCenterLeftQuarter = 8,   // 中间左侧四分之一部分
+    NXCropImageStyleLeftQuarter = 9,         // 左侧四分之一部分
+};
+
+@interface UIImage (NXCategory)
+
+#pragma mark - blur 效果
+/**
+ 给图片打马赛克
+ @param image 原始图片
+ @param blur 值越 blurry 就越大
+ @return 处理后的图片
+ */
++ (UIImage *)nx_blurryImage:(UIImage *)image withBlurLevel:(CGFloat)blur;
+
+/**
+  boxblur image 这个要在整理
+
+  @param toBlurImage 要处理的图片
+  @return 处理后图片
+ */
++ (UIImage *)nx_boxblurImage:(UIImage *)toBlurImage;
+
+#pragma mark - 旋转
+/**
+  照片旋转90度,如从系统相册中取出的原图要转正
+
+ @param aImage 原图
+ @param isFront YES 为前置拍照
+ @return 转正后图片
+ */
++ (UIImage *)nx_fixOrientation:(UIImage *)aImage isFront:(BOOL)isFront;
+
+/**
+ 旋转图片
+
+ @param image 原图
+ @param orientation 旋转的方向
+ @return 旋转后的图片
+ */
++ (UIImage *)nx_rotationImage:(UIImage *)image orientation:(UIImageOrientation)orientation;
+
+#pragma mark - 缩放
+/**
+ 等比缩放图片
+
+ @param size 放到的大小(单位为像素)
+ @return 处理后的图片
+ */
+- (UIImage *)nx_scaleToSize:(CGSize)size;
+
+/**
+ 等比缩放图片 按照最短边缩放
+ @param maxLength 边长最大值 (单位为像素)
+ @return 处理后的图片
+ */
+- (UIImage *)nx_scaleWithMaxLength:(float)maxLength;
+
+#pragma mark - 截取
+/**
+ 截取 uiimage 指定区域
+
+ @param style 类型为 NXCropImageStyle
+ @return 裁剪后的图片
+ */
+- (UIImage *)nx_imageByCroppingWithStyle:(NXCropImageStyle)style;
+
+/**
+  截取 uiimage 指定区域
+
+ @param rect 裁剪区域
+ @return 裁剪后的图片
+ */
+- (UIImage *)imageByCroppingWithRect:(CGRect)rect;
+
+
+/**
+ 将图片按照最短边等比截取图片中间部分
+
+ @return 截取后到正方形图片
+ */
+- (UIImage *)nx_cropImageToSquare;
+
+/**
+ *  将图片等比绘制到正方形画布中并重新生成新图
+ *
+ *  @return 处理后的图片
+ */
+- (UIImage *)nx_zoomImageToSquare;
+
+/**
+ 将图片等比缩放的指定的画布中并生成新图。(跟画布比例不一样的做 左右或者上下留白处理)
+
+ @param size 指定画布大小
+ @return 处理后的新图
+ */
+- (UIImage *)nx_zoomWithSize:(CGSize)size;
+
+/**
+ 高清截屏 opaque 为no 有透明度速度会慢一些
+
+ @param view 指定的VIEW
+ @return 截屏图片
+ */
++ (UIImage *)nx_screenHierarchyShots:(UIView *)view;
+
+/**
+ 高清截屏
+
+ @param view 指定的VIEW
+ @param opaque 透明开关,如果图形完全不用透明,设置为YES以优化位图的存储。
+ @return 截屏图片
+ */
++ (UIImage *)nx_screenHierarchyShots:(UIView *)view isOpaque:(BOOL)opaque;
+
+/**
+ 获得裁剪图片
+
+ e.g.
+ int squalWidth = MIN(self.clipImage.size.width, self.clipImage.size.height);
+
+ float clipX = _clipScroll.contentOffset.x;
+ float clipY = _clipScroll.contentOffset.y;
+ CGRect rect = CGRectMake(clipX, clipY, NX_MAIN_SCREEN_WIDTH, NX_MAIN_SCREEN_WIDTH);
+
+ clipedImage =
+ [UIImage nx_cropImageView:_bigImageView toRect:rect zoomScale:1
+ containerView:_backView outputWith:squalWidth];
+
+ @param imageView 原始VIEW
+ @param rect 截取区域
+ @param zoomScale 缩放大小
+ @param containerView 显示区域VIEW
+ @param outputWith 输出大小
+ @return 处理后图片
+ */
++ (UIImage *)nx_cropImageView:(UIImageView *)imageView
+                       toRect:(CGRect)rect
+                    zoomScale:(double)zoomScale
+                containerView:(UIView *)containerView
+                   outputWith:(CGFloat)outputWith;
+
+#pragma mark - 圆角
+/**
+ 切圆角 可防止离屏渲染
+ e.g.
+ UIImage *placeHolder = [[UIImage imageNamed:@"userIcon"] circleImage];
+
+ @param img 原图片
+ @return 处理后的图片
+ */
++ (UIImage *)nx_circleImage:(UIImage *)img;
+
+/** 切圆角 可防止离屏渲染
+ * @param image 需要进行圆角的图片
+ * @param direction 切割的方向
+ * @param cornerRadii 圆角半径
+ * @param borderWidth 边框宽度
+ * @param borderColor 边框颜色
+ * @param backgroundColor 背景色
+ * @return 处理后的图片
+ */
++ (UIImage *)nx_circleImage:(UIImage *)image cuttingDirection:(UIRectCorner)direction cornerRadii:(CGFloat)cornerRadii borderWidth:(CGFloat)borderWidth borderColor:(UIColor *)borderColor backgroundColor:(UIColor *)backgroundColor;
+
+/**
+ 获取当前屏幕大小的的开屏页图片
+ 
+ @return 开屏页图片
+ */
++ (UIImage *)nx_launchImage;
+
+
+/**
+ 把指定颜色背景变成透明
+
+ @param image 原图数据
+ @param color 原背景色
+ @return 背景透明后的图
+ */
++ (UIImage*)transparentBackClear:(UIImage*)image color:(UIColor*)color;
+
+@end

+ 642 - 0
BFCommonKit/Classes/BFCategorys/UIImage+NXCategory.m

@@ -0,0 +1,642 @@
+//
+//  UIImage+UIImage_NXCategory.m
+//  AKImovie
+//
+//  Created by AK on 16/2/21.
+//  Copyright © 2016年 ak. All rights reserved.
+//
+
+#import "UIImage+NXCategory.h"
+#import <Accelerate/Accelerate.h>
+
+@implementation UIImage (NXCategory)
+
+#pragma mark - blur 效果
++ (UIImage *)nx_blurryImage:(UIImage *)image withBlurLevel:(CGFloat)blur
+{
+    CIImage *inputImage = [CIImage imageWithCGImage:image.CGImage];
+    CIFilter *filter = [CIFilter filterWithName:@"CIGaussianBlur"
+                                  keysAndValues:kCIInputImageKey, inputImage, @"inputRadius", @(blur), nil];
+
+    CIImage *outputImage = filter.outputImage;
+    CIContext *context = [CIContext contextWithOptions:nil];
+    CGImageRef outImage = [context createCGImage:outputImage fromRect:[outputImage extent]];
+    return [UIImage imageWithCGImage:outImage];
+}
+
++ (UIImage *)nx_boxblurImage:(UIImage *)toBlurImage
+{
+    UIImage *newImage =
+
+        [toBlurImage nx_scaleToSize:CGSizeMake(toBlurImage.size.width / 2., toBlurImage.size.height / 2.)];
+
+    NSData *jpgData = UIImageJPEGRepresentation(newImage, 0.01);
+
+    UIImage *image = [UIImage imageWithData:jpgData];
+    CGFloat blur = 0.3f;
+
+    int boxSize = (int)(blur * 40);
+    boxSize = boxSize - (boxSize % 2) + 1;
+
+    CGImageRef img = image.CGImage;
+    vImage_Buffer inBuffer, outBuffer;
+    vImage_Error error;
+    void *pixelBuffer;
+
+    // create vImage_Buffer with data from CGImageRef
+    CGDataProviderRef inProvider = CGImageGetDataProvider(img);
+    CFDataRef inBitmapData = CGDataProviderCopyData(inProvider);
+
+    inBuffer.width = CGImageGetWidth(img);
+    inBuffer.height = CGImageGetHeight(img);
+    inBuffer.rowBytes = CGImageGetBytesPerRow(img);
+
+    inBuffer.data = (void *)CFDataGetBytePtr(inBitmapData);
+
+    // create vImage_Buffer for output
+    pixelBuffer = malloc(CGImageGetBytesPerRow(img) * CGImageGetHeight(img));
+
+    if (pixelBuffer == NULL) NSLog(@"No pixelbuffer");
+
+    outBuffer.data = pixelBuffer;
+    outBuffer.width = CGImageGetWidth(img);
+    outBuffer.height = CGImageGetHeight(img);
+    outBuffer.rowBytes = CGImageGetBytesPerRow(img);
+
+    // perform convolution
+    error =
+        vImageBoxConvolve_ARGB8888(&inBuffer, &outBuffer, NULL, 0, 0, boxSize, boxSize, NULL, kvImageEdgeExtend)
+            ?: vImageBoxConvolve_ARGB8888(&outBuffer, &inBuffer, NULL, 0, 0, boxSize, boxSize, NULL, kvImageEdgeExtend)
+                   ?: vImageBoxConvolve_ARGB8888(&inBuffer, &outBuffer, NULL, 0, 0, boxSize, boxSize, NULL,
+                                                 kvImageEdgeExtend);
+
+    if (error)
+    {
+        NSLog(@"error from convolution %ld", error);
+    }
+
+    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+    CGContextRef ctx = CGBitmapContextCreate(outBuffer.data, outBuffer.width, outBuffer.height, 8, outBuffer.rowBytes,
+                                             colorSpace, (CGBitmapInfo)kCGImageAlphaNoneSkipLast);
+    CGImageRef imageRef = CGBitmapContextCreateImage(ctx);
+    UIImage *returnImage = [UIImage imageWithCGImage:imageRef];
+
+    // clean up
+    CGContextRelease(ctx);
+    CGColorSpaceRelease(colorSpace);
+
+    free(pixelBuffer);
+    CFRelease(inBitmapData);
+    CGImageRelease(imageRef);
+
+    return returnImage;
+}
+
+#pragma mark - 旋转
++ (UIImage *)nx_fixOrientation:(UIImage *)aImage isFront:(BOOL)isFront;
+{
+    // No-op if the orientation is already correct
+    if (aImage.imageOrientation == UIImageOrientationUp) return aImage;
+
+    // We need to calculate the proper transformation to make the image upright.
+    // We do it in 2 steps: Rotate if Left/Right/Down, and then flip if Mirrored.
+    CGAffineTransform transform = CGAffineTransformIdentity;
+
+    if (isFront)
+    {
+        transform = CGAffineTransformTranslate(transform, aImage.size.width, 0);
+        transform = CGAffineTransformScale(transform, -1, 1);
+    }
+
+    switch (aImage.imageOrientation)
+    {
+        case UIImageOrientationDown:
+        case UIImageOrientationDownMirrored:
+            transform = CGAffineTransformTranslate(transform, aImage.size.width, aImage.size.height);
+            transform = CGAffineTransformRotate(transform, M_PI);
+            break;
+
+        case UIImageOrientationLeft:
+        case UIImageOrientationLeftMirrored:
+            transform = CGAffineTransformTranslate(transform, aImage.size.width, 0);
+            transform = CGAffineTransformRotate(transform, M_PI_2);
+            break;
+
+        case UIImageOrientationRight:
+        case UIImageOrientationRightMirrored:
+            transform = CGAffineTransformTranslate(transform, 0, aImage.size.height);
+            transform = CGAffineTransformRotate(transform, -M_PI_2);
+            break;
+        default:
+            break;
+    }
+
+    switch (aImage.imageOrientation)
+    {
+        case UIImageOrientationUpMirrored:
+        case UIImageOrientationDownMirrored:
+            transform = CGAffineTransformTranslate(transform, aImage.size.width, 0);
+            transform = CGAffineTransformScale(transform, -1, 1);
+            break;
+
+        case UIImageOrientationLeftMirrored:
+        case UIImageOrientationRightMirrored:
+            transform = CGAffineTransformTranslate(transform, aImage.size.height, 0);
+            transform = CGAffineTransformScale(transform, -1, 1);
+            break;
+        default:
+            break;
+    }
+
+    // Now we draw the underlying CGImage into a new context, applying the
+    // transform
+    // calculated above.
+    CGContextRef ctx =
+        CGBitmapContextCreate(NULL, aImage.size.width, aImage.size.height, CGImageGetBitsPerComponent(aImage.CGImage),
+                              0, CGImageGetColorSpace(aImage.CGImage), CGImageGetBitmapInfo(aImage.CGImage));
+    CGContextConcatCTM(ctx, transform);
+    switch (aImage.imageOrientation)
+    {
+        case UIImageOrientationLeft:
+        case UIImageOrientationLeftMirrored:
+        case UIImageOrientationRight:
+        case UIImageOrientationRightMirrored:
+            // Grr...
+            CGContextDrawImage(ctx, CGRectMake(0, 0, aImage.size.height, aImage.size.width), aImage.CGImage);
+            break;
+
+        default:
+            CGContextDrawImage(ctx, CGRectMake(0, 0, aImage.size.width, aImage.size.height), aImage.CGImage);
+            break;
+    }
+
+    // And now we just create a new UIImage from the drawing context
+    CGImageRef cgimg = CGBitmapContextCreateImage(ctx);
+    UIImage *img = [UIImage imageWithCGImage:cgimg];
+    CGContextRelease(ctx);
+    CGImageRelease(cgimg);
+    return img;
+}
+
+// 旋转
++ (UIImage *)nx_rotationImage:(UIImage *)image orientation:(UIImageOrientation)orientation
+{
+    long double rotate = 0.0;
+    CGRect rect;
+    float translateX = 0;
+    float translateY = 0;
+    float scaleX = 1.0;
+    float scaleY = 1.0;
+
+    switch (orientation)
+    {
+        case UIImageOrientationLeft:
+            rotate = M_PI_2;
+            rect = CGRectMake(0, 0, image.size.height, image.size.width);
+            translateX = 0;
+            translateY = -rect.size.width;
+            scaleY = rect.size.width / rect.size.height;
+            scaleX = rect.size.height / rect.size.width;
+            break;
+        case UIImageOrientationRight:
+            rotate = 3 * M_PI_2;
+            rect = CGRectMake(0, 0, image.size.height, image.size.width);
+            translateX = -rect.size.height;
+            translateY = 0;
+            scaleY = rect.size.width / rect.size.height;
+            scaleX = rect.size.height / rect.size.width;
+            break;
+        case UIImageOrientationDown:
+            rotate = M_PI;
+            rect = CGRectMake(0, 0, image.size.width, image.size.height);
+            translateX = -rect.size.width;
+            translateY = -rect.size.height;
+            break;
+        default:
+            rotate = 0.0;
+            rect = CGRectMake(0, 0, image.size.width, image.size.height);
+            translateX = 0;
+            translateY = 0;
+            break;
+    }
+
+    UIGraphicsBeginImageContext(rect.size);
+    CGContextRef context = UIGraphicsGetCurrentContext();
+    //做CTM变换
+    CGContextTranslateCTM(context, 0.0, rect.size.height);
+    CGContextScaleCTM(context, 1.0, -1.0);
+    CGContextRotateCTM(context, rotate);
+    CGContextTranslateCTM(context, translateX, translateY);
+
+    CGContextScaleCTM(context, scaleX, scaleY);
+    //绘制图片
+    CGContextDrawImage(context, CGRectMake(0, 0, rect.size.width, rect.size.height), image.CGImage);
+
+    UIImage *newPic = UIGraphicsGetImageFromCurrentImageContext();
+    NSLog(@"image size %f---%f", image.size.width, image.size.height);
+    UIGraphicsEndImageContext();
+    return newPic;
+}
+
+#pragma mark - 缩放
+- (UIImage *)nx_scaleToSize:(CGSize)size
+{
+    CGFloat width = CGImageGetWidth(self.CGImage);
+    CGFloat height = CGImageGetHeight(self.CGImage);
+
+    float verticalRadio = size.height * 1.0 / height;
+    float horizontalRadio = size.width * 1.0 / width;
+
+    float radio = 1;
+    if (verticalRadio > 1 && horizontalRadio > 1)
+    {
+        radio = verticalRadio > horizontalRadio ? horizontalRadio : verticalRadio;
+    }
+    else
+    {
+        radio = verticalRadio < horizontalRadio ? verticalRadio : horizontalRadio;
+    }
+
+    width = width * radio;
+    height = height * radio;
+
+    int xPos = (size.width - width) / 2;
+    int yPos = (size.height - height) / 2;
+
+    // 创建一个bitmap的context
+    // 并把它设置成为当前正在使用的context
+    UIGraphicsBeginImageContext(size);
+
+    // 绘制改变大小的图片
+    [self drawInRect:CGRectMake(xPos, yPos, width, height)];
+
+    // 从当前context中创建一个改变大小后的图片
+    UIImage *scaledImage = UIGraphicsGetImageFromCurrentImageContext();
+
+    // 使当前的context出堆栈
+    UIGraphicsEndImageContext();
+
+    // 返回新的改变大小后的图片
+    return scaledImage;
+}
+
+//按照最短边缩放 maxlength 边长最大值
+- (UIImage *)nx_scaleWithMaxLength:(float)maxLength
+{
+    if (self.size.width > maxLength || self.size.height > maxLength)
+    {
+        float maxWidth = maxLength;
+        float maxHeight = maxLength;
+
+        if (self.size.width != self.size.height)
+        {
+            if (self.size.width > self.size.height)
+            {
+                //按照宽 来缩放
+                float imageScale = maxLength / self.size.width;
+                maxHeight = self.size.height * imageScale;
+            }
+            else if (self.size.width < self.size.height)
+            {
+                float imageScale = maxLength / self.size.height;
+
+                maxWidth = self.size.width * imageScale;
+            }
+        }
+        // 返回新的改变大小后的图片
+        return [self nx_scaleToSize:CGSizeMake(maxWidth, maxHeight)];
+    }
+
+    return self;
+}
+
+#pragma mark - 截取
+- (UIImage *)nx_imageByCroppingWithStyle:(NXCropImageStyle)style
+{
+    CGRect rect = CGRectZero;
+    switch (style)
+    {
+        case NXCropImageStyleLeft:
+            rect = CGRectMake(0, 0, self.size.width / 2, self.size.height);
+            break;
+        case NXCropImageStyleCenter:
+            rect = CGRectMake(self.size.width / 4, 0, self.size.width / 2, self.size.height);
+            break;
+        case NXCropImageStyleRight:
+            rect = CGRectMake(self.size.width / 2, 0, self.size.width / 2, self.size.height);
+            break;
+        case NXCropImageStyleLeftOneOfThird:
+            rect = CGRectMake(0, 0, self.size.width / 3, self.size.height);
+            break;
+        case NXCropImageStyleCenterOneOfThird:
+            rect = CGRectMake(self.size.width / 3, 0, self.size.width / 3, self.size.height);
+            break;
+        case NXCropImageStyleRightOneOfThird:
+            rect = CGRectMake(self.size.width / 3 * 2, 0, self.size.width / 3, self.size.height);
+            break;
+        case NXCropImageStyleLeftQuarter:
+            rect = CGRectMake(0, 0, self.size.width / 4, self.size.height);
+            break;
+        case NXCropImageStyleCenterLeftQuarter:
+            rect = CGRectMake(self.size.width / 4, 0, self.size.width / 4, self.size.height);
+            break;
+        case NXCropImageStyleCenterRightQuarter:
+            rect = CGRectMake(self.size.width / 4 * 2, 0, self.size.width / 4, self.size.height);
+            break;
+        case NXCropImageStyleRightQuarter:
+            rect = CGRectMake(self.size.width / 4 * 3, 0, self.size.width / 4, self.size.height);
+            break;
+        default:
+            break;
+    }
+
+    return [self imageByCroppingWithRect:rect];
+}
+
+- (UIImage *)imageByCroppingWithRect:(CGRect)rect
+{
+    CGImageRef imageRef = self.CGImage;
+    CGImageRef imagePartRef = CGImageCreateWithImageInRect(imageRef, rect);
+    UIImage *cropImage = [UIImage imageWithCGImage:imagePartRef];
+    CGImageRelease(imagePartRef);
+    return cropImage;
+}
+
+- (UIImage *)nx_cropImageToSquare{
+
+    if(self.size.width == self.size.height)
+    {
+        return self;
+    }
+    double w = self.size.width;
+    double h = self.size.height;
+    double m = MIN(w, h);
+    CGRect rect = CGRectMake((self.size.width - m)/2.0f , (self.size.height - m)/2.0f, m, m);
+    return [self imageByCroppingWithRect:rect];
+}
+
+- (UIImage *)nx_zoomWithSize:(CGSize)size{
+
+    if(self == nil)
+    {
+        return nil;
+    }
+    
+    double w  = self.size.width;
+    double h =self.size.height;
+    double vRatio = w / size.width;
+    double hRatio = h / size.height;
+    double ratio = MAX(vRatio, hRatio);
+    w /= ratio;
+    h /= ratio;
+    CGRect drawRect = CGRectMake((size.width - w)/2.0f , (size.height - h)/2.0f, w, h);
+    // 创建一个bitmap的context
+    // 并把它设置成为当前正在使用的context
+    UIGraphicsBeginImageContext(size);
+    // 绘制改变大小的图片
+    [self drawInRect:drawRect];
+    // 从当前context中创建一个改变大小后的图片
+    UIImage *scaledImage = UIGraphicsGetImageFromCurrentImageContext();
+    // 使当前的context出堆栈
+    UIGraphicsEndImageContext();
+    return  scaledImage;
+    
+}
+
+
+- (UIImage *)nx_zoomImageToSquare
+{
+    if (self == nil)
+    {
+        return nil;
+    }
+    double tw = MIN(self.size.width, self.size.height);
+
+    return [self nx_scaleToSize:CGSizeMake(tw, tw)];
+}
+
+//截屏 有透明的
++ (UIImage *)nx_screenHierarchyShots:(UIView *)view { return [UIImage nx_screenHierarchyShots:view isOpaque:NO]; }
+//高清截屏 opaque 是否有透明图层
++ (UIImage *)nx_screenHierarchyShots:(UIView *)view isOpaque:(BOOL)opaque
+{
+    // size——同UIGraphicsBeginImageContext
+    // opaque—透明开关,如果图形完全不用透明,设置为YES以优化位图的存储。
+    // scale—–缩放因子
+    UIGraphicsBeginImageContextWithOptions(view.bounds.size, opaque, 0);
+    [view.layer renderInContext:UIGraphicsGetCurrentContext()];
+    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
+    UIGraphicsEndImageContext();
+    return image;
+}
+
+/// 获得裁剪后的图片
++ (UIImage *)nx_cropImageView:(UIImageView *)imageView
+                       toRect:(CGRect)rect
+                    zoomScale:(double)zoomScale
+                containerView:(UIView *)containerView
+                   outputWith:(CGFloat)outputWith
+{
+    CGAffineTransform transform = CGAffineTransformIdentity;
+    // 平移的处理
+    CGRect imageViewRect = [imageView convertRect:imageView.bounds toView:containerView];
+    CGPoint point = CGPointMake(imageViewRect.origin.x + imageViewRect.size.width / 2,
+                                imageViewRect.origin.y + imageViewRect.size.height / 2);
+
+    CGPoint zeroPoint =
+        CGPointMake(CGRectGetWidth(containerView.frame) / 2., CGRectGetHeight(containerView.frame) / 2.);
+
+    CGPoint translation = CGPointMake(point.x - zeroPoint.x, point.y - zeroPoint.y);
+    transform = CGAffineTransformTranslate(transform, translation.x, translation.y);
+    // 缩放的处理
+    transform = CGAffineTransformScale(transform, zoomScale, zoomScale);
+
+    CGImageRef imageRef = [self nx_newTransformedImage:transform
+                                           sourceImage:imageView.image.CGImage
+                                            sourceSize:imageView.image.size
+                                           outputWidth:outputWith
+                                              cropSize:rect.size
+                                         imageViewSize:imageView.frame.size];
+    UIImage *cropedImage = [UIImage imageWithCGImage:imageRef];
+    CGImageRelease(imageRef);
+    return cropedImage;
+}
+
++ (CGImageRef)nx_newTransformedImage:(CGAffineTransform)transform
+                         sourceImage:(CGImageRef)sourceImage
+                          sourceSize:(CGSize)sourceSize
+                         outputWidth:(CGFloat)outputWidth
+                            cropSize:(CGSize)cropSize
+                       imageViewSize:(CGSize)imageViewSize
+{
+    CGImageRef source = [self nx_newScaledImage:sourceImage toSize:sourceSize];
+
+    CGFloat aspect = cropSize.height / cropSize.width;
+    CGSize outputSize = CGSizeMake(outputWidth, outputWidth * aspect);
+
+    CGContextRef context =
+        CGBitmapContextCreate(NULL, outputSize.width, outputSize.height, CGImageGetBitsPerComponent(source), 0,
+                              CGImageGetColorSpace(source), CGImageGetBitmapInfo(source));
+    CGContextSetFillColorWithColor(context, [[UIColor clearColor] CGColor]);
+    CGContextFillRect(context, CGRectMake(0, 0, outputSize.width, outputSize.height));
+
+    CGAffineTransform uiCoords =
+        CGAffineTransformMakeScale(outputSize.width / cropSize.width, outputSize.height / cropSize.height);
+    uiCoords = CGAffineTransformTranslate(uiCoords, cropSize.width / 2.0, cropSize.height / 2.0);
+    uiCoords = CGAffineTransformScale(uiCoords, 1.0, -1.0);
+    CGContextConcatCTM(context, uiCoords);
+
+    CGContextConcatCTM(context, transform);
+    CGContextScaleCTM(context, 1.0, -1.0);
+
+    CGContextDrawImage(context, CGRectMake(-imageViewSize.width / 2, -imageViewSize.height / 2.0, imageViewSize.width,
+                                           imageViewSize.height),
+                       source);
+    CGImageRef resultRef = CGBitmapContextCreateImage(context);
+    CGContextRelease(context);
+    CGImageRelease(source);
+    return resultRef;
+}
+
++ (CGImageRef)nx_newScaledImage:(CGImageRef)source toSize:(CGSize)size
+{
+    CGSize srcSize = size;
+    CGColorSpaceRef rgbColorSpace = CGColorSpaceCreateDeviceRGB();
+    CGContextRef context = CGBitmapContextCreate(NULL, size.width, size.height, 8, 0, rgbColorSpace,
+                                                 kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
+    CGColorSpaceRelease(rgbColorSpace);
+
+    CGContextSetInterpolationQuality(context, kCGInterpolationNone);
+    CGContextTranslateCTM(context, size.width / 2, size.height / 2);
+
+    CGContextDrawImage(context, CGRectMake(-srcSize.width / 2, -srcSize.height / 2, srcSize.width, srcSize.height),
+                       source);
+
+    CGImageRef resultRef = CGBitmapContextCreateImage(context);
+    CGContextRelease(context);
+    return resultRef;
+}
+
+#pragma mark - 圆角
++ (UIImage *)nx_circleImage:(UIImage *)img
+{
+   return [self nx_circleImage:img cuttingDirection:UIRectCornerAllCorners cornerRadii:img.size.height/2. borderWidth:0 borderColor: [UIColor clearColor] backgroundColor: [UIColor clearColor]];
+}
+
++ (UIImage *)nx_circleImage:(UIImage *)image cuttingDirection:(UIRectCorner)direction cornerRadii:(CGFloat)cornerRadii borderWidth:(CGFloat)borderWidth borderColor:(UIColor *)borderColor backgroundColor:(UIColor *)backgroundColor
+{
+    //处理后的数据
+    UIImage * newImage = nil;
+    if (image.size.height != 0 && image.size.width != 0)
+    {
+        if (cornerRadii == 0)
+        {
+            cornerRadii = image.size.height / 2;
+        }
+        CGRect rect = CGRectMake(0, 0, image.size.width, image.size.height);
+        UIGraphicsBeginImageContextWithOptions(rect.size, NO, [UIScreen mainScreen].scale);
+        CGContextRef currnetContext = UIGraphicsGetCurrentContext();
+        if (currnetContext) {
+            
+            UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:rect byRoundingCorners:direction cornerRadii:CGSizeMake(cornerRadii - borderWidth, cornerRadii - borderWidth)];
+            CGContextAddPath(currnetContext,path.CGPath);
+            CGContextClip(currnetContext);
+            
+            [image drawInRect:rect];
+            [borderColor setStroke];// 画笔颜色
+            [backgroundColor setFill];// 填充颜色
+            [path stroke];
+            [path fill];
+            newImage = UIGraphicsGetImageFromCurrentImageContext();
+            UIGraphicsEndImageContext();
+        }
+        
+        return newImage;
+    }
+    
+    return newImage;
+}
+
++ (UIImage *)nx_launchImage
+{
+    CGSize viewSize  = [UIScreen mainScreen].bounds.size;
+    
+    NSString * viewOrientation = @"Portrait";
+    NSString * launchImageName = nil;
+    NSArray * imageDict = [[[NSBundle mainBundle] infoDictionary]valueForKey:@"UILaunchImages"];
+    for (NSDictionary  * dict in imageDict)
+    {
+        CGSize imageSize = CGSizeFromString(dict[@"UILaunchImageSize"]);
+        if (CGSizeEqualToSize(imageSize, viewSize) && [viewOrientation isEqualToString:dict[@"UILaunchImageOrientation"]])
+        {
+            launchImageName = dict[@"UILaunchImageName"];
+        }
+    }
+    UIImage * launchImage = [UIImage imageNamed:launchImageName];
+    
+    return launchImage;
+}
+
+
++ (UIImage*)transparentBackClear:(UIImage*)image color:(UIColor*)color
+{
+    // 分配内存
+    const int imageWidth = image.size.width;
+    const int imageHeight = image.size.height;
+    size_t bytesPerRow = imageWidth * 4;
+    uint32_t* rgbImageBuf = (uint32_t*)malloc(bytesPerRow * imageHeight);
+    
+    // 创建context
+    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+    CGContextRef context = CGBitmapContextCreate(rgbImageBuf, imageWidth, imageHeight, 8, bytesPerRow, colorSpace,
+                                                 kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipLast);
+    CGContextDrawImage(context, CGRectMake(0, 0, imageWidth, imageHeight), image.CGImage);
+    
+    // 遍历像素
+    int pixelNum = imageWidth * imageHeight;
+    uint32_t* pCurPtr = rgbImageBuf;
+    for (int i = 0; i < pixelNum; i++, pCurPtr++)
+    {
+        if ((*pCurPtr & 0xFFFFFF00) == 0xffffff00) {
+            
+            // 此处把白色背景颜色给变为透明
+            uint8_t* ptr = (uint8_t*)pCurPtr;
+            ptr[0] = 0;
+            
+        }else{
+            
+            // 改成下面的代码,会将图片转成想要的
+            //            uint8_t* ptr = (uint8_t*)pCurPtr;
+            //
+            //            ptr[3] = 0; //0~255
+            //
+            //            ptr[2] = 0;
+            //
+            //            ptr[1] = 0;
+        }
+    }
+    
+    // 将内存转成image
+    CGDataProviderRef dataProvider =CGDataProviderCreateWithData(NULL, rgbImageBuf, bytesPerRow * imageHeight, ProviderReleaseData);
+    
+    CGImageRef imageRef = CGImageCreate(imageWidth, imageHeight,8, 32, bytesPerRow, colorSpace,
+                                        kCGImageAlphaLast |kCGBitmapByteOrder32Little, dataProvider,
+                                        NULL, true,kCGRenderingIntentDefault);
+    CGDataProviderRelease(dataProvider);
+    
+    UIImage* resultUIImage = [UIImage imageWithCGImage:imageRef];
+    
+    // 释放
+    CGImageRelease(imageRef);
+    CGContextRelease(context);
+    CGColorSpaceRelease(colorSpace);
+    
+    return resultUIImage;
+}
+
+void ProviderReleaseData (void *info, const void *data, size_t size)
+{
+    free((void*)data);
+}
+
+@end

+ 1 - 17
BFCommonKit/Classes/BFConfig/PQBFConfig.swift

@@ -7,22 +7,6 @@
 
 import UIKit
 
-// MARK: - 风格
-
-/// 风格
-public  enum  styleColor: String {
-    case nomal = "#F1034D"
-    case green = "#3DC1C1"
-    case red = "#EE0051"
-}
-
-// MARK: - statusBar
-
-/// statusBar
-public enum  statusBarStyle {
-    case light
-    case dark
-}
 public class PQBFConfig: NSObject {
     public static let shared = PQBFConfig()
     /**
@@ -60,7 +44,7 @@ public class PQBFConfig: NSObject {
     // 裁剪主题色
     public var cutViewStyleColor: UIColor = UIColor(red: 61.0 / 255.0, green: 193.0 / 255.0, blue: 193.0 / 255.0, alpha: 1)
     // 素材删除图
-    public var materialDeleteImage: UIImage?
+    public var materialDeleteImage: UIImage = UIImage().BF_Image(named:"icon_search_delete")
     // 裁剪主题色61, 193, 193
     public var cutDurationColor: UIColor = UIColor(red: 61.0 / 255.0, green: 193.0 / 255.0, blue: 193.0 / 255.0, alpha: 0.1)
     // 裁剪主题色

+ 218 - 125
BFCommonKit/Classes/BFEnums/Enums.swift

@@ -43,88 +43,88 @@ public  enum  PQVIDEO_PLAY_STATUS {
 /// 页面场景
 public  enum  PAGESOURCE: String {
     /*************** 视频相关pageSource ***************/
-    case sp_category = "speedApp-category" //   首页-单列
-    case sp_category_recommend = "speedApp-category_recommend" // 由首页单列右划
-    case sp_categoryDouble = "speedApp-categoryDouble" // 首页-双列
-    case sp_videoDetail = "speedApp-videoDetail" // 视频详情页
-    case sp_videoDetail_search = "speedApp-videoDetail_search" //    由搜索结果列表进入
-    case sp_videoDetail_search_recommend = "speedApp-videoDetail_search_recommend" // 由搜索结果列表进入
-    case sp_videoDetail_upload = "speedApp-videoDetail_upload" //     由我的tab中“作品”列表进入
-    case sp_videoDetail_upload_recommend = "speedApp-videoDetail_upload_recommend" // 、由我的tab中“作品”列表进入
-    case sp_videoDetail_favorite = "speedApp-videoDetail_favorite" // 由我的喜欢列表进入
-    case sp_videoDetail_share = "speedApp-videoDetail_share" // 由我的分享列表进入
-    case sp_videoDetail_favorite_recommend = "speedApp-videoDetail_favorite_recommend" // 由我的喜欢列表推荐
-    case sp_userHomePage = "speedApp-userHomePage" // 用户个人主页
-    case sp_videoDetail_userHomePage = "speedApp-videoDetail_userHomePage" // 由用户个人主页进入
-    case sp_videoDetail_userHomePage_recommend = "speedApp-videoDetail_userHomePage_recommend" // 由用户个人主页进入
-    case sp_recommendBottom = "speedApp-recommendBottom" //    底部展示的3个相关推荐视频
-    case sp_follow = "speedApp-follow" // 关注tab
-    case sp_follow_recommend = "speedApp-follow_recommend" // 由关注列表右划
-    case sp_followSingle = "speedApp-followSingle" // 关注tab点击顶部个人头像进入某个人的关注
-    case sp_followSingle_recommend = "speedApp-followSingle_recommend" // 关注tab点击顶部个人头像进入某个人的关注
-    case sp_mine = "speedApp-mine" // 我的tab
-    case sp_search = "speedApp-search" // 搜索页
-    case sp_uploadVideo = "speedApp-uploadVideo" // 视频制作入口
+    case sp_category = "shanyinApp-category" //   首页-单列
+    case sp_category_recommend = "shanyinApp-category_recommend" // 由首页单列右划
+    case sp_categoryDouble = "shanyinApp-categoryDouble" // 首页-双列
+    case sp_videoDetail = "shanyinApp-videoDetail" // 视频详情页
+    case sp_videoDetail_search = "shanyinApp-videoDetail_search" //    由搜索结果列表进入
+    case sp_videoDetail_search_recommend = "shanyinApp-videoDetail_search_recommend" // 由搜索结果列表进入
+    case sp_videoDetail_upload = "shanyinApp-videoDetail_upload" //     由我的tab中“作品”列表进入
+    case sp_videoDetail_upload_recommend = "shanyinApp-videoDetail_upload_recommend" // 、由我的tab中“作品”列表进入
+    case sp_videoDetail_favorite = "shanyinApp-videoDetail_favorite" // 由我的喜欢列表进入
+    case sp_videoDetail_share = "shanyinApp-videoDetail_share" // 由我的分享列表进入
+    case sp_videoDetail_favorite_recommend = "shanyinApp-videoDetail_favorite_recommend" // 由我的喜欢列表推荐
+    case sp_userHomePage = "shanyinApp-userHomePage" // 用户个人主页
+    case sp_videoDetail_userHomePage = "shanyinApp-videoDetail_userHomePage" // 由用户个人主页进入
+    case sp_videoDetail_userHomePage_recommend = "shanyinApp-videoDetail_userHomePage_recommend" // 由用户个人主页进入
+    case sp_recommendBottom = "shanyinApp-recommendBottom" //    底部展示的3个相关推荐视频
+    case sp_follow = "shanyinApp-follow" // 关注tab
+    case sp_follow_recommend = "shanyinApp-follow_recommend" // 由关注列表右划
+    case sp_followSingle = "shanyinApp-followSingle" // 关注tab点击顶部个人头像进入某个人的关注
+    case sp_followSingle_recommend = "shanyinApp-followSingle_recommend" // 关注tab点击顶部个人头像进入某个人的关注
+//    case sp_mine = "shanyinApp-mine" // 我的tab
+    case sp_search = "shanyinApp-search" // 搜索页
+    case sp_uploadVideo = "shanyinApp-uploadVideo" // 视频制作入口
 
     /*************** 活动相关pageSource ***************/
-    case sp_activity_entranceButton = "speedApp_playActivity_entranceButton" // 活动活动入口按键
-    case sp_activity_invite = "speedApp_playActivity_invite" // H5页面内邀请好友按键
-    case sp_activity_threeDot = "speedApp_playActivity_threeDot" // APP右上角…按键
-    case sp_activity_shareFriend = "speedApp_playActivity_shareFriend" // 进一步点击分享好友
-    case sp_activity_shareMoment = "speedApp_playActivity_shareMoment" // 进一步点击分享朋友圈
-    case sp_activity_openH5 = "speedApp_playActivity_completeOpenH5" // 当天完成活动的弹窗->去查看
-    case sp_activity_openH5AndPayment = "speedApp_playActivity_completeOpenH5AndPayment" // 当天完成活动的弹窗->报名明日
-    case sp_activity_failOpenH5 = "speedApp_playActivity_missionFailWindowOpenH5" // 未成功弹窗->继续活动
-    case sp_activity_success_share = "speedApp_playActivity_missionSuccessWindow_share" // 成功弹窗->分享给好友炫耀下
-    case sp_activity_entrance_close = "speedApp_playActivity_entrance_close" // 活动入口弹窗->关闭按钮
-    case sp_activity_entranceWindow = "speedApp_playActivity_entranceWindow" // 活动入口弹窗
-    case sp_activity_successWindow = "speedApp_playActivity_missionSuccessWindow" // 成功弹窗
-    case sp_activity_failWindow = "speedApp_playActivity_missionFailWindow" // 未成功弹窗
-    case sp_activity_completeWindow = "speedApp_playActivity_missionCompleteWindow" //  当天完成活动的弹窗
+    case sp_activity_entranceButton = "shanyinApp_playActivity_entranceButton" // 活动活动入口按键
+    case sp_activity_invite = "shanyinApp_playActivity_invite" // H5页面内邀请好友按键
+    case sp_activity_threeDot = "shanyinApp_playActivity_threeDot" // APP右上角…按键
+    case sp_activity_shareFriend = "shanyinApp_playActivity_shareFriend" // 进一步点击分享好友
+    case sp_activity_shareMoment = "shanyinApp_playActivity_shareMoment" // 进一步点击分享朋友圈
+    case sp_activity_openH5 = "shanyinApp_playActivity_completeOpenH5" // 当天完成活动的弹窗->去查看
+    case sp_activity_openH5AndPayment = "shanyinApp_playActivity_completeOpenH5AndPayment" // 当天完成活动的弹窗->报名明日
+    case sp_activity_failOpenH5 = "shanyinApp_playActivity_missionFailWindowOpenH5" // 未成功弹窗->继续活动
+    case sp_activity_success_share = "shanyinApp_playActivity_missionSuccessWindow_share" // 成功弹窗->分享给好友炫耀下
+    case sp_activity_entrance_close = "shanyinApp_playActivity_entrance_close" // 活动入口弹窗->关闭按钮
+    case sp_activity_entranceWindow = "shanyinApp_playActivity_entranceWindow" // 活动入口弹窗
+    case sp_activity_successWindow = "shanyinApp_playActivity_missionSuccessWindow" // 成功弹窗
+    case sp_activity_failWindow = "shanyinApp_playActivity_missionFailWindow" // 未成功弹窗
+    case sp_activity_completeWindow = "shanyinApp_playActivity_missionCompleteWindow" //  当天完成活动的弹窗
 
     /*************** 上传相关pageSource ***************/
-    case sp_upload_videoSelect = "speedApp-upload_videoSelect" //  选视频-进入页面事件
-    case sp_upload_coverSelect = "speedApp-upload_coverSelect" //  选封面-进入页面事件
-    case sp_upload_videoPublish = "speedApp-upload_videoPublish" //  发布-进入页面事件
+    case sp_upload_videoSelect = "shanyinApp-upload_videoSelect" //  选视频-进入页面事件
+    case sp_upload_coverSelect = "shanyinApp-upload_coverSelect" //  选封面-进入页面事件
+    case sp_upload_videoPublish = "shanyinApp-upload_videoPublish" //  发布-进入页面事件
 
     /*************** tab点击相关pageSource ***************/
-    case sp_categoryTabButton = "speedApp-categoryTabButton" //  首页tab
-    case sp_followTabButton = "speedApp-followTabButton" //  关注tab
-    case sp_uploadTabButton = "speedApp-uploadTabButton" //  上传tab
-    case sp_mineTabButton = "speedApp-mineTabButton" //  我的tab
-    case sp_msg_tabBtn = "speedApp_msgTabButton" //  消息tab
+    case sp_categoryTabButton = "shanyinApp-categoryTabButton" //  首页tab
+    case sp_followTabButton = "shanyinApp-followTabButton" //  关注tab
+    case sp_uploadTabButton = "shanyinApp-uploadTabButton" //  上传tab
+    case sp_mineTabButton = "shanyinApp-mineTabButton" //  我的tab
+    case sp_msg_tabBtn = "shanyinApp_msgTabButton" //  消息tab
 
     /*************** 发布pageSource ***************/
-    case sp_videoMaking = "speedApp-videoMaking" // 视频创作
-    case sp_videoCompose_guid = "speedApp-videoCompose_guid" // 预览页面
-    case sp_videoCompose_edit = "speedApp-videoCompose_edit" // 编辑页面
-    case sp_videoCompose_overview = "speedApp-videoCompose_overview" // 总览页面
-    case sp_videoCompose_composition = "speedApp-videoCompose_composition" // 合成页面
+    case sp_videoMaking = "shanyinApp-videoMaking" // 视频创作
+    case sp_videoCompose_guid = "shanyinApp-videoCompose_guid" // 预览页面
+    case sp_videoCompose_edit = "shanyinApp-videoCompose_edit" // 编辑页面
+    case sp_videoCompose_overview = "shanyinApp-videoCompose_overview" // 总览页面
+    case sp_videoCompose_composition = "shanyinApp-videoCompose_composition" // 合成页面
     case sp_material_search = "vlog-pages/user-videos-share" // 素材搜索上报
 
     /*************** 消息pageSource ***************/
-    case sp_msg_shareSpace = "speedApp-message" // 分享空间
-    case sp_msg_shareSpace_detail = "speedApp-message_shareSpace" // 分享空间详情
-    case sp_msg_share = "speedApp-message_share" // 分享
-    case sp_msg_like = "speedApp-message_like" // 喜欢
-    case sp_msg_fans = "speedApp-message_fans" // 粉丝
-    case sp_msg_push = "speedApp-message_push" // 通知
+    case sp_msg_shareSpace = "shanyinApp-message" // 分享空间
+    case sp_msg_shareSpace_detail = "shanyinApp-message_shareSpace" // 分享空间详情
+    case sp_msg_share = "shanyinApp-message_share" // 分享
+    case sp_msg_like = "shanyinApp-message_like" // 喜欢
+    case sp_msg_fans = "shanyinApp-message_fans" // 粉丝
+    case sp_msg_push = "shanyinApp-message_push" // 通知
 
     /*************** 草稿箱相关pageSource ***************/
-    case sp_draft_projectList = "speedApp-projectList" // 草稿箱列表
-    case sp_reproduce_childList = "speedApp-reproduceCollection_child" // 再制作子列表页面
-    case sp_reproduce_fatherList = "speedApp-reproduceCollection_father" // 再制作父列表页面
-    case sp_reproduce_chilDetailList = "speedApp-videoDetail_reproduceCollection_child" // 再制作子列表页面
-    case sp_reproduce_fatherDetailList = "speedApp-videoDetail_reproduceCollection_father" // 再制作父列表页面
+    case sp_draft_projectList = "shanyinApp-projectList" // 草稿箱列表
+    case sp_reproduce_childList = "shanyinApp-reproduceCollection_child" // 再制作子列表页面
+    case sp_reproduce_fatherList = "shanyinApp-reproduceCollection_father" // 再制作父列表页面
+    case sp_reproduce_chilDetailList = "shanyinApp-videoDetail_reproduceCollection_child" // 再制作子列表页面
+    case sp_reproduce_fatherDetailList = "shanyinApp-videoDetail_reproduceCollection_father" // 再制作父列表页面
     // add by ak
-    case sp_speedApp_upload2Compose = "speedApp-upload2Compose" // 上传转创作
+    case sp_shanyinApp_upload2Compose = "shanyinApp-upload2Compose" // 上传转创作
 
     /*************** 卡点视频相关pageSource ***************/
-    case sp_stuck_selectMaterial = "speedApp-selectSyncedUpMaterial" // 卡点视频素材选择页
-    case sp_stuck_selectSynceedUpMusic = "speedApp-selectSynceedUpMusic" // 卡点视频音乐选择页
-    case sp_stuck_previewSyncedUp = "speedApp_previewSyncedUp" // 预览页面曝光上报
-    case sp_stuck_searchSyncedUpMusic = "speedApp_searchSyncedUpMusic" // 音乐素材搜索页
-    case sp_stuck_publishSyncedUp = "speedApp_publishSyncedUp" // 合成发布页
+    case sp_stuck_selectMaterial = "shanyinApp-selectSyncedUpMaterial" // 卡点视频素材选择页
+    case sp_stuck_selectSynceedUpMusic = "shanyinApp-selectSynceedUpMusic" // 卡点视频音乐选择页
+    case sp_stuck_previewSyncedUp = "shanyinApp_previewSyncedUp" // 预览页面曝光上报
+    case sp_stuck_searchSyncedUpMusic = "shanyinApp_searchSyncedUpMusic" // 音乐素材搜索页
+    case sp_stuck_publishSyncedUp = "shanyinApp_publishSyncedUp" // 合成发布页
     
     /*************** 话题相关pageSource ***************/
     case sp_cmunit_collect = "collectAgeGenderPage" // 年龄 / 话题收集页
@@ -144,8 +144,21 @@ public  enum  PAGESOURCE: String {
     case sp_cmunit_loginPage = "loginPage" // 登陆页
     case sp_cmunit_interestedTopic = "hotTopicRecommendWindow" // 热门话题推荐页
     case sp_cmunit_cmtMsgPage = "commentMessagePage" // 评论消息页
+<<<<<<< HEAD
     case sp_cmunit_mePage = "mePage" // 我的页
     case sp_cmunit_userPage = "homePage" // 个人主页
+=======
+    
+    //点击上报:首页点击底部“我的”页面入口
+    case sp_shanyinApp_main = "shanyinApp-main"
+    //页面曝光上报:“我的”页面曝光
+    case sp_shanyinApp_mine = "shanyinApp-mine"
+    
+    func pageName(app:String) -> String {
+        // 获取AppName
+        return app + self.rawValue
+    }
+>>>>>>> 562e8c01406fbc811364b82548c44e4dc165953a
 }
 
 // MARK: - objectType
@@ -154,80 +167,80 @@ public  enum  PAGESOURCE: String {
 public  enum  objectType: String {
     /*************** tab点击相关pageSource ***************/
 
-    case ot_home_tabBtn = "speedApp-categoryTabButton" //  首页tab
-    case ot_follow_tabBtn = "speedApp-followTabButton" //  关注tab
-    case ot_up_tabBtn = "speedApp-uploadTabButton" //  上传tab
-    case ot_mine_tabBtn = "speedApp-mineTabButton" //  我的tab
-    case ot_public_tabBtn = "speedApp-publicTabButton" //  发布tab
-    case ot_msg_tabBtn = "speedApp_msgTabButton" //  消息tab
+    case ot_home_tabBtn = "shanyinApp-categoryTabButton" //  首页tab
+    case ot_follow_tabBtn = "shanyinApp-followTabButton" //  关注tab
+    case ot_up_tabBtn = "shanyinApp-uploadTabButton" //  上传tab
+    case ot_mine_tabBtn = "shanyinApp-mineTabButton" //  我的tab
+    case ot_public_tabBtn = "shanyinApp-publicTabButton" //  发布tab
+    case ot_msg_tabBtn = "shanyinApp_msgTabButton" //  消息tab
 
     /*************** 上传相关objectType ***************/
-    case ot_up_backBtn = "speedApp-uploadBackButton" // 点击左下角叉子
-    case ot_up_nextBtn = "speedApp-uploadNextButton" // 点击右下角下一步
-    case ot_up_coverBtn = "speedApp-uploadCoverButton" // 点击上传封面
-    case ot_up_pickCoverBtn = "speedApp-pickCoverButton" // 点击截取封面
-    case ot_up_publishBtn = "speedApp-videoPublishButton" // 点击发布
-    case ot_up_changeCoverBtn = "speedApp-changeCoverButton" // 点击选封面返回
-    case ot_up_start = "speedApp-uploadStart" // 上传开始事件
-    case ot_up_fail = "speedApp-uploadFail" // 上传中断/失败事件
-    case ot_up_restart = "speedApp-uploadRestart" // 上传重试事件
-    case ot_up_success = "speedApp-uploadSuccess" // 上传完成
-    case ot_up_publishSuccess = "speedApp-videoPublishSuccess" // 发布完成
-    case ot_up_viewPopup_guideUsersToShare = "speedApp_viewPopup_guideUsersToShare_pubishVideo" // 发布成功弹出分享界面
-    case ot_up_clickWechatMoments_guideUsersToShare = "speedApp_clickWechatMoments_guideUsersToShare_pubishVideo" // 分享介面点击微信朋友圈
-    case ot_up_clickWechat_guideUsersToShare = "speedApp_clickWechat_guideUsersToShare_pubishVideo"
-    case ot_selectVideoProductionMode = "speedApp_viewWindow_selectVideoProductionMode"
+    case ot_up_backBtn = "shanyinApp-uploadBackButton" // 点击左下角叉子
+    case ot_up_nextBtn = "shanyinApp-uploadNextButton" // 点击右下角下一步
+    case ot_up_coverBtn = "shanyinApp-uploadCoverButton" // 点击上传封面
+    case ot_up_pickCoverBtn = "shanyinApp-pickCoverButton" // 点击截取封面
+    case ot_up_publishBtn = "shanyinApp-videoPublishButton" // 点击发布
+    case ot_up_changeCoverBtn = "shanyinApp-changeCoverButton" // 点击选封面返回
+    case ot_up_start = "shanyinApp-uploadStart" // 上传开始事件
+    case ot_up_fail = "shanyinApp-uploadFail" // 上传中断/失败事件
+    case ot_up_restart = "shanyinApp-uploadRestart" // 上传重试事件
+    case ot_up_success = "shanyinApp-uploadSuccess" // 上传完成
+    case ot_up_publishSuccess = "shanyinApp-videoPublishSuccess" // 发布完成
+    case ot_up_viewPopup_guideUsersToShare = "shanyinApp_viewPopup_guideUsersToShare_pubishVideo" // 发布成功弹出分享界面
+    case ot_up_clickWechatMoments_guideUsersToShare = "shanyinApp_clickWechatMoments_guideUsersToShare_pubishVideo" // 分享介面点击微信朋友圈
+    case ot_up_clickWechat_guideUsersToShare = "shanyinApp_clickWechat_guideUsersToShare_pubishVideo"
+    case ot_selectVideoProductionMode = "shanyinApp_viewWindow_selectVideoProductionMode"
     // 分享界面点击微信好友
     /*************** 创作工具相关objectType ***************/
     case ot_makevideo_video = "video" // 视频
     case ot_makevideo_gif = "gif" // 动态图
     case ot_makevideo_jpg = "jpg" // 图片
-    case ot_enterComposeToolButton = "speedApp_enterComposeToolButton" // 点击上传tab后-点击发布视频 add by ak & 视频合成入口
-    case ot_enterVideoUploadButton = "speedApp_enterVideoUploadButton" // 点击上传tab后-点击上传视频
-    case ot_videoCompose_overviewButton = "speedApp_videoCompose_overviewButton" // 点击总览
-    case ot_videoCompose_videoCompositeButton = "speedApp_videoCompose_videoCompositeButton" // 点击去发布
-    case ot_videoCompose_videoPublish = "speedApp_videoPublishButton" // 发布视频
-    case ot_speedApp_searchButton = "speedApp_searchButton" // 发布视频
+    case ot_enterComposeToolButton = "shanyinApp_enterComposeToolButton" // 点击上传tab后-点击发布视频 add by ak & 视频合成入口
+    case ot_enterVideoUploadButton = "shanyinApp_enterVideoUploadButton" // 点击上传tab后-点击上传视频
+    case ot_videoCompose_overviewButton = "shanyinApp_videoCompose_overviewButton" // 点击总览
+    case ot_videoCompose_videoCompositeButton = "shanyinApp_videoCompose_videoCompositeButton" // 点击去发布
+    case ot_videoCompose_videoPublish = "shanyinApp_videoPublishButton" // 发布视频
+    case ot_shanyinApp_searchButton = "shanyinApp_searchButton" // 发布视频
     case ot_pageView = "pageView" // 页面访问
     //
     // 图文入口
-    case ot_speedApp_clickButton_imageAndTextGenerateVideo = "speedApp_clickButton_imageAndTextGenerateVideo"
+    case ot_shanyinApp_clickButton_imageAndTextGenerateVideo = "shanyinApp_clickButton_imageAndTextGenerateVideo"
     // 电子相册
-    case ot_speedApp_clickButton_electronicAlbum = "speedApp_clickButton_electronicAlbum"
+    case ot_shanyinApp_clickButton_electronicAlbum = "shanyinApp_clickButton_electronicAlbum"
     /*************** 消息相关objectType ***************/
-    case ot_msg_fansMsgButton = "speedApp_msgTab_fansMsgButton" //  粉丝消息入口
-    case ot_msg_likeMsgButton = "speedApp_msgTab_likeMsgButton" //  喜欢消息入口
-    case ot_msg_shareMsgButton = "speedApp_msgTab_shareMsgButton" //  分享消息入口
-    case ot_msg_commentMsgButton = "speedApp_msgTab_commentMsgButton" //  评论消息入口
-    case ot_msg_systemMsgButton = "speedApp_msgTab_systemMsgButton" //  通知消息入口
+    case ot_msg_fansMsgButton = "shanyinApp_msgTab_fansMsgButton" //  粉丝消息入口
+    case ot_msg_likeMsgButton = "shanyinApp_msgTab_likeMsgButton" //  喜欢消息入口
+    case ot_msg_shareMsgButton = "shanyinApp_msgTab_shareMsgButton" //  分享消息入口
+    case ot_msg_commentMsgButton = "shanyinApp_msgTab_commentMsgButton" //  评论消息入口
+    case ot_msg_systemMsgButton = "shanyinApp_msgTab_systemMsgButton" //  通知消息入口
 
     /*************** 消息详情相关objectType ***************/
-    case ot_msg_shareSpaceViewTab = "speedApp_message_shareSpace_viewTab" // 分享空间详情页观看
-    case ot_msg_shareSpaceLikeTab = "speedApp_message_shareSpace_likeTab" // 分享空间详情页喜欢
-    case ot_msg_shareSpaceCommentTab = "speedApp_message_shareSpace_commentTab" // 分享空间详情页评论
-    case ot_msg_shareSpaceShareTab = "speedApp_message_shareSpace_shareTab" // 分享空间详情页分享
+    case ot_msg_shareSpaceViewTab = "shanyinApp_message_shareSpace_viewTab" // 分享空间详情页观看
+    case ot_msg_shareSpaceLikeTab = "shanyinApp_message_shareSpace_likeTab" // 分享空间详情页喜欢
+    case ot_msg_shareSpaceCommentTab = "shanyinApp_message_shareSpace_commentTab" // 分享空间详情页评论
+    case ot_msg_shareSpaceShareTab = "shanyinApp_message_shareSpace_shareTab" // 分享空间详情页分享
 
     /*************** 草稿箱相关objectType ***************/
-    case ot_draft_clicktButton = "speedApp_clickOpenProjectListButton" // 草稿箱点击入口
-    case ot_draft_editProject = "speedApp_editProject" // - 点击 Project Item(草稿箱中的每个项目)
-    case ot_draft_viewProject = "speedApp_viewProject" // - 看到 Project Item(草稿箱中的每个项目)
-    case ot_draft_clickEditProject = "speedApp_clickEditProject" // - 点击 Project Item 弹出菜单的「编辑」按钮
-    case ot_draft_clickPublishProject = "speedApp_clickPublishProject" // - 点击 Project Item 弹出菜单的「去发布」按钮
-    case ot_draft_clickRenameProject = "speedApp_clickRenameProject" // - 点击 Project Item 弹出菜单的「重命名」按钮
-    case ot_draft_clickCopyProject = "speedApp_clickCopyProject" // - 点击 Project Item 弹出菜单的「复制」按钮
-    case ot_draft_clickDeleteProject = "speedApp_clickDeleteProject" // - 点击 Project Item 弹出菜单的「删除」按钮
-    case ot_draft_uploadMaterial = "speedApp_uploadMaterial" // - 素材开始上传事件
-    case ot_draft_uploadMatrialSuccess = "speedApp_uploadMatrialSuccess" // - 素材上传成功事件
-    case ot_draft_downloadMaterial = "speedApp_downloadMaterial" // - 素材开始下载事件
-    case ot_draft_downloadMaterialSuccess = "speedApp_downloadMaterialSuccess" // - 素材下载成功事件
-    case ot_videoCompose_mux_complete = "speedApp_videoCompose_mux_complete" // 创作工具「合成成功」添加上报参数
-
-    case ot_reproduce_collectionClicButton = "speedApp_clickReproduceButton_collection" // - 再创作集合页的「再创作按钮」
-    case ot_reproduce_clickButton = "speedApp_clickReProduceButton" // 再创作按钮(右上角)点击上报
-    case ot_reproduce_collectionBar = "speedApp_clickReproduceCollectionBar" // 再创作按钮(左下角)点击上报
-    case ot_reproduce_collectionVideo = "speedApp_clickReproduceCollectionVideo" // 再创作集合页的「视频」点击上报
-    case ot_reproduce_sameSourceButton = "speedApp_viewSameSourceButton" // 再创作查看同款来源按钮
-    case ot_reproduce_saveProjectToDraftBox = "speedApp-saveProjectToDraftBox" // 创作工具「保存项目成功」添加上报参数
+    case ot_draft_clicktButton = "shanyinApp_clickOpenProjectListButton" // 草稿箱点击入口
+    case ot_draft_editProject = "shanyinApp_editProject" // - 点击 Project Item(草稿箱中的每个项目)
+    case ot_draft_viewProject = "shanyinApp_viewProject" // - 看到 Project Item(草稿箱中的每个项目)
+    case ot_draft_clickEditProject = "shanyinApp_clickEditProject" // - 点击 Project Item 弹出菜单的「编辑」按钮
+    case ot_draft_clickPublishProject = "shanyinApp_clickPublishProject" // - 点击 Project Item 弹出菜单的「去发布」按钮
+    case ot_draft_clickRenameProject = "shanyinApp_clickRenameProject" // - 点击 Project Item 弹出菜单的「重命名」按钮
+    case ot_draft_clickCopyProject = "shanyinApp_clickCopyProject" // - 点击 Project Item 弹出菜单的「复制」按钮
+    case ot_draft_clickDeleteProject = "shanyinApp_clickDeleteProject" // - 点击 Project Item 弹出菜单的「删除」按钮
+    case ot_draft_uploadMaterial = "shanyinApp_uploadMaterial" // - 素材开始上传事件
+    case ot_draft_uploadMatrialSuccess = "shanyinApp_uploadMatrialSuccess" // - 素材上传成功事件
+    case ot_draft_downloadMaterial = "shanyinApp_downloadMaterial" // - 素材开始下载事件
+    case ot_draft_downloadMaterialSuccess = "shanyinApp_downloadMaterialSuccess" // - 素材下载成功事件
+    case ot_videoCompose_mux_complete = "shanyinApp_videoCompose_mux_complete" // 创作工具「合成成功」添加上报参数
+
+    case ot_reproduce_collectionClicButton = "shanyinApp_clickReproduceButton_collection" // - 再创作集合页的「再创作按钮」
+    case ot_reproduce_clickButton = "shanyinApp_clickReProduceButton" // 再创作按钮(右上角)点击上报
+    case ot_reproduce_collectionBar = "shanyinApp_clickReproduceCollectionBar" // 再创作按钮(左下角)点击上报
+    case ot_reproduce_collectionVideo = "shanyinApp_clickReproduceCollectionVideo" // 再创作集合页的「视频」点击上报
+    case ot_reproduce_sameSourceButton = "shanyinApp_viewSameSourceButton" // 再创作查看同款来源按钮
+    case ot_reproduce_saveProjectToDraftBox = "shanyinApp-saveProjectToDraftBox" // 创作工具「保存项目成功」添加上报参数
     // add by ak
     case speedApp_viewWindow_upload2Compose // 「上传转创作」:窗口曝光
     case speedApp_clickButton_upload2Compose_addMusic // 「上传转创作」:加音乐 - 按钮点击
@@ -287,6 +300,60 @@ public  enum  objectType: String {
     case ot_shanyinApp_clickButton_changeTitle = "shanyinApp_clickButton_changeTitle"
     case ot_shanyinApp_clickButton_changeCover = "shanyinApp_clickButton_changeCover"
     
+    //1.2.0版本快慢速
+    //点击快慢速
+    case ot_shanyinApp_musicVideoPreview_selectPatternSpeed = "shanyinApp_musicVideoPreview_selectPatternSpeed"
+    //点击跳跃卡点
+    case ot_shanyinApp_musicVideoPreview_selectPatternMusicVideo = "shanyinApp_musicVideoPreview_selectPatternMusicVideo"
+    //点击仅音乐
+    case ot_shanyinApp_musicVideoPreview_selectPatternBgm = "shanyinApp_musicVideoPreview_selectPatternBgm"
+    
+    //音乐库相统计
+    //- 音乐tab点击数
+    case ot_shanyinApp_musicVideoPreview_musicTab = "shanyinApp_musicVideoPreview_musicTab"
+    //- 剪辑tab点击
+    case ot_shanyinApp_musicVideoPreview_videoTab = "shanyinApp_musicVideoPreview_videoTab"
+    //- 音乐素材曝光数
+    case ot_shanyinApp_musicVideoPreview_musicView = "shanyinApp_musicVideoPreview_musicView"
+    //- 音乐试听数
+    case ot_shanyinApp_musicVideoPreview_musicCategorySelect = "shanyinApp_musicVideoPreview_musicCategorySelect"
+    //- 音乐使用数
+    case ot_shanyinApp_musicVideoPreview_musicSelect = "shanyinApp_musicVideoPreview_musicSelect"
+    //- 音乐选框移动数(与原推荐位置不一致)
+    case ot_shanyinApp_musicVideoPreview_musicPeriodSelect = "shanyinApp_musicVideoPreview_musicPeriodSelect"
+    //- 搜索页面曝光
+    case ot_shanyinApp_musicVideoPreview_musicSearch = "shanyinApp_musicVideoPreview_musicSearch"
+    
+    //- 音乐试听数
+    case ot_shanyinApp_musicVideoPreview_musicSearchAudition = "shanyinApp_musicVideoPreview_musicSearchAudition"
+    //- 音乐使用数
+    case ot_shanyinApp_musicVideoPreview_musicSearchSelect = "shanyinApp_musicVideoPreview_musicSearchSelect"
+    
+    //快慢速模式
+    //  - 抛留比例按钮切换点击数
+    case ot_shanyinApp_musicVideoPreview_selectSpeed = "shanyinApp_musicVideoPreview_selectSpeed"
+    //  - 自定义抛留比按钮点击数
+    case ot_shanyinApp_musicVideoPreview_customizeSpeed = "shanyinApp_musicVideoPreview_customizeSpeed"
+    //  - 选择节奏
+    case ot_shanyinApp_musicVideoPreview_selectSpeedRhythm = "shanyinApp_musicVideoPreview_selectSpeedRhythm"
+    
+    // 跳跃卡点模式
+    //  - 抛留比例按钮切换点击数
+    case ot_shanyinApp_musicVideoPreview_selectRatio = "shanyinApp_musicVideoPreview_selectRatio"
+    //  - 自定义抛留比按钮点击数
+    case ot_shanyinApp_musicVideoPreview_customizeRatio = "shanyinApp_musicVideoPreview_customizeRatio"
+    //  - 选择节奏
+    case ot_shanyinApp_musicVideoPreview_selectMusicVideoRhythm = "shanyinApp_musicVideoPreview_selectMusicVideoRhythm"
+   
+ 
+    // 仅配乐模式
+    // 循环比例按钮切换点击数
+    case ot_shanyinApp_musicVideoPreview_selectRepeatTimes = "shanyinApp_musicVideoPreview_selectRepeatTimes"
+    //  - 自定义抛留比按钮点击数
+    case ot_shanyinApp_musicVideoPreview_customizeRepeatTimes = "shanyinApp_musicVideoPreview_customizeRepeatTimes"
+    //  - 选择节奏
+    case ot_shanyinApp_musicVideoPreview_selectMusicVideoRepeatRhythm = "shanyinApp_musicVideoPreview_selectMusicVideoRepeatRhythm"
+        
     /*************** 话题相关objectType ***************/
     case ot_cmunit_syncedBtn = "syncedUpMusicButton" // 音乐视频
     case ot_cmunit_createBtn = "videoIdeaButton" // 视频想法
@@ -310,7 +377,6 @@ public  enum  objectType: String {
     case ot_cmunit_skipBtn = "skipButton" // 点击「跳过」按钮
     case ot_cmunit_loginButton = "loginButton" // 点击「登录」按钮
     case ot_cmunit_cmtMsgItem = "commentMessageItem" // 评论消息item
-    
 }
 
 // MARK: - 视频上报类型
@@ -563,6 +629,15 @@ public  enum  REFRESH_TYPE {
     case REFRESH_TYPE_AUTOFOOTER // 尾部
 }
 
+/// 滑动方向
+public  enum  moveDirection {
+    case moveDirectionNormal
+    case moveDirectionUp
+    case moveDirectionDown
+    case moveDirectionRight
+    case moveDirectionLeft
+}
+
 // MARK: - 关注跟粉丝cell类型
 
 /// 关注跟粉丝cell类型
@@ -842,3 +917,21 @@ public  enum  adPosition: String {
     case splashAd // 票圈视频 App 闪屏页广告位
     case videoFlowAd // 票圈视频 App 视频流广告位
 }
+
+
+// MARK: - 风格
+
+/// 风格
+public  enum  styleColor: String {
+    case nomal = "#F1034D"
+    case green = "#3DC1C1"
+    case red = "#EE0051"
+}
+
+// MARK: - statusBar
+
+/// statusBar
+public enum  statusBarStyle {
+    case light
+    case dark
+}

+ 6 - 2
BFCommonKit/Classes/BFUtility/PQCommonMethodUtil.swift

@@ -14,6 +14,8 @@ import Kingfisher
 import KingfisherWebP
 import Photos
 import Toast_Swift
+import RealmSwift
+
 /// Home文件地址
 public let homeDirectory = NSHomeDirectory()
 /// docdocumens文件地址
@@ -421,18 +423,20 @@ public func getMachineCode() -> String {
 ///   - msg: <#msg description#>
 /// - Returns: <#description#>
 public func cShowHUB(superView: UIView?, msg: String?) {
+    var sty : ToastStyle = ToastManager.shared.style
+    sty.messageAlignment = .center
     DispatchQueue.main.async {
         if superView == nil {
             if msg == nil {
                 UIApplication.shared.keyWindow?.makeToastActivity(.center)
             } else {
-                UIApplication.shared.keyWindow?.makeToast(msg, duration: 3.0, position: .center)
+                UIApplication.shared.keyWindow?.makeToast(msg, duration: 3.0, position: .center, style: sty)
             }
         } else {
             if msg == nil {
                 superView!.makeToastActivity(.center)
             } else {
-                superView!.makeToast(msg, duration: 3.0, position: .center)
+                superView!.makeToast(msg, duration: 3.0, position: .center,style: sty)
             }
         }
     }

+ 9 - 9
Example/Podfile.lock

@@ -35,15 +35,15 @@ PODS:
   - KingfisherWebP (1.3.0):
     - Kingfisher (~> 6.2)
     - libwebp (>= 1.1.0)
-  - libwebp (1.2.0):
-    - libwebp/demux (= 1.2.0)
-    - libwebp/mux (= 1.2.0)
-    - libwebp/webp (= 1.2.0)
-  - libwebp/demux (1.2.0):
+  - libwebp (1.2.1):
+    - libwebp/demux (= 1.2.1)
+    - libwebp/mux (= 1.2.1)
+    - libwebp/webp (= 1.2.1)
+  - libwebp/demux (1.2.1):
     - libwebp/webp
-  - libwebp/mux (1.2.0):
+  - libwebp/mux (1.2.1):
     - libwebp/demux
-  - libwebp/webp (1.2.0)
+  - libwebp/webp (1.2.1)
   - Realm (10.7.6):
     - Realm/Headers (= 10.7.6)
   - Realm/Headers (10.7.6)
@@ -79,7 +79,7 @@ SPEC CHECKSUMS:
   KeychainAccess: c0c4f7f38f6fc7bbe58f5702e25f7bd2f65abf51
   Kingfisher: 6c3df386db71d82c0817a429d2c9421a77396529
   KingfisherWebP: dec17a5eb1af2658791bde1f93ae9a853678f826
-  libwebp: 3aa3dfd4b00d3caf4c12b4bbc17e9b7b2df3f6fb
+  libwebp: 98a37e597e40bfdb4c911fc98f2c53d0b12d05fc
   Realm: ed860452717c8db8f4bf832b6807f7f2ce708839
   RealmSwift: e31c4ddbcc42ac879313d656b86f9ca539f6f4f4
   SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
@@ -87,4 +87,4 @@ SPEC CHECKSUMS:
 
 PODFILE CHECKSUM: 5c138dc5d174c9336dd4473cb26265c7619334aa
 
-COCOAPODS: 1.10.2
+COCOAPODS: 1.11.2