|
@@ -23,29 +23,7 @@ class PQStuckPointMusicController: PQBaseViewController {
|
|
|
// 选中的素材数据
|
|
|
var selectedPhotoData: [PHAsset]?{
|
|
|
didSet {
|
|
|
- if selectedPhotoData != nil && selectedPhotoData!.count > 0 {
|
|
|
- let photo = selectedPhotoData!.first!
|
|
|
- let option = PHImageRequestOptions()
|
|
|
- option.isNetworkAccessAllowed = true //允许下载iCloud的图片
|
|
|
- option.resizeMode = .none
|
|
|
- option.deliveryMode = .highQualityFormat
|
|
|
- let startTime = Date()
|
|
|
- PHImageManager.default().requestImage(for: photo,
|
|
|
- targetSize: CGSize(width: 1920, height: 1920),
|
|
|
- contentMode: .aspectFit,
|
|
|
- options: option)
|
|
|
- { (image, nil) in
|
|
|
- //image就是图片
|
|
|
- if image != nil {
|
|
|
- self.firstFrameImage = image
|
|
|
- if self.stuckPointEditVC != nil {
|
|
|
- self.stuckPointEditVC?.firstFrameImage = image
|
|
|
- }
|
|
|
-
|
|
|
-// BFLog(1, message: "aaa: \(Date().timeIntervalSince(startTime)), \(String(describing: image?.size))")
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
// 选中的音乐数据
|