|
@@ -23,7 +23,29 @@ class PQStuckPointMusicController: PQBaseViewController {
|
|
|
|
|
|
var selectedPhotoData: [PHAsset]?{
|
|
|
didSet {
|
|
|
-
|
|
|
+ if selectedPhotoData != nil && selectedPhotoData!.count > 0 {
|
|
|
+ let photo = selectedPhotoData!.first!
|
|
|
+ let option = PHImageRequestOptions()
|
|
|
+ option.isNetworkAccessAllowed = true
|
|
|
+ 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
|
|
|
+
|
|
|
+ if image != nil {
|
|
|
+ self.firstFrameImage = image
|
|
|
+ if self.stuckPointEditVC != nil {
|
|
|
+ self.stuckPointEditVC?.firstFrameImage = image
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|