marinofaggiana 4 년 전
부모
커밋
25d19cc643
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      iOSClient/Viewer/NCViewerPeekPop.swift

+ 2 - 2
iOSClient/Viewer/NCViewerPeekPop.swift

@@ -44,12 +44,12 @@ class NCViewerPeekPop: UIViewController  {
         if metadata.directory {
 
             imageView.image = UIImage(named: "folder")!.image(color: NCBrandColor.shared.brandElement, size: standardSizeWidth)
-            if let image = imageView.image { preferredContentSize = CGSize(width: image.size.width,  height: image.size.height) }
+            preferredContentSize = imageView.frame.size
 
         } else {
             
             imageView.image = UIImage.init(named: metadata.iconName)?.resizeImage(size: CGSize(width: standardSizeWidth, height: standardSizeHeight), isAspectRation: true)
-            if let image = imageView.image { preferredContentSize = CGSize(width: image.size.width,  height: image.size.height) }
+            preferredContentSize = imageView.frame.size
         
             if metadata.hasPreview {