아직은 개린이

[iOS] UIImagePicker와 PhotoKit 본문

Swift + iOS/iOS

[iOS] UIImagePicker와 PhotoKit

jiyeonlab 2019. 11. 26. 14:59

[iOS] UIImavePickerController & PhotoKit

요즘 부스트코스의 Part4를 공부하고 있는데, 스탠포드 강의에서 접하지 않았던 Photos Framework에 대해 새롭게 배우고 있다. 

기존에 사진첩에 접근하여 이미지를 선택하기 위해 사용했던 UIImagePickerController와의 무엇이 다른건지 간단히 정리해보려 한다.

 


UIImagePickerController 

A view controller that manages the system interfaces for taking pictures, recording movies, and choosing items from the user's media library.

 

UIImagePickerController는 UIKit 프레임워크의 ViewController의 서브클래스이다. 사진 또는 비디오를 촬영하거나 사용자의 미디어 라이브러리에서 사진이나 비디오를 선택할 수 있게 도와주는 인터페이스를 관리하는 ViewController이다. 

간단히 말하면 단순한 UI 인터페이스에 해당한다고 생각하면 될 것 같다. 

 


PhotoKit

Work with image and video assets managed by the Photos app, including those from iCloud Photos and Live Photos.

 

PhotoKit은 프레임워크에 해당한다. 사용자의 포토 라이브러리나 iCloud 앨범을 관리할 수 있다. 여기서 관리라는 것은 Asset에 해당하는 이미지, 비디오 또는 라이브 포토를 내 애플리케이션에 가져올 수도 있고, asset들을 수정할 수도 있다는 뜻이다. 

 

Photos Framework

 


정리

UIImagePickerController 는 UIKit > ViewControllers > UIImagePickerController Class이고,

PhotoKit은 그 자체로 iOS의 프레임워크이다.

 


참고자료

https://developer.apple.com/documentation/uikit/uiimagepickercontroller

https://developer.apple.com/documentation/photokit

'Swift + iOS > iOS' 카테고리의 다른 글

[iOS 아키텍처 패턴] MVC  (0) 2020.02.28
[iOS] UITextField의 Placeholder 텍스트 색상 바꾸기  (0) 2020.01.14
[iOS] prepare 메소드란?  (1) 2019.11.22
[iOS] Segue 연결 방법  (0) 2019.11.20
[iOS] Singleton Design Pattern  (1) 2019.11.18