ios개발

<ios framework> ios 이미지 최적화, UIKit

studying develop 2020. 4. 7. 23:51

뭐라고 불러야 될지 잘 모르겠다. 이미지 렌더링이라 생각했는데

 

[https://kor45cw.tistory.com/286]

 

[https://jinnify.tistory.com/60

 

[https://developer.apple.com/documentation/uikit/uiimageview] 이게 가장 정확한 이유 같다. 검색중 블랜딩 너무 많이해서, opaque 설정으로 해결했다는 글 본거 같은데. 여기도 해당 작업이 비싸다 써있음

 

이 외에도 읽어 볼만한 글이 많은거 같다.

Tips for Improving Performance

Image scaling and alpha blending are two relatively expensive operations that can impact your app’s performance. To maximize performance of your image view code, consider the following tips:

  • Cache scaled versions of frequently used images. If you expect certain large images to be displayed frequently in a scaled-down thumbnail view, consider creating the scaled-down images in advance and storing them in a thumbnail cache. Doing so alleviates the need for each image view to scale them separately.

  • Use images whose size is close to the size of the image view. Rather than assigning a large image to an image view, created a scaled version that matches the current size of the image view. You can also create a resizable image object using the UIImage.ResizingMode.tile option, which tiles the image instead of scaling it.

  • Make your image view opaque whenever possible. Unless you are intentionally working with images that contain transparency (drawing UI elements, for example), make sure the isOpaque property of your image view is set to true. For more information about how transparency is determined, see Determining the Final Transparency of the Image.