본문 바로가기

전체 글

(54)
[iOS] AVFoundation, AVPlayer, AVPlayerLayer AVFoundation Work with audiovisual assets, control device cameras, process audio, and configure system audio interactions. 시청각 에셋 관련 작업을 하고, 디바이스 카메라를 제어하고, 오디오를 처리하고, 시스템 오디오 상호작용을 구성한다. AVKit이 동영상 플레이 위주라면, AVFoundation은 동영상, 오디오 등 여러 미디어 관련 작업을 위한 프레임워크인 듯 하다. AVFoundation은 iOS, tvOS, macOS를 위한 애플의 미디어 프레임워크이다. 이를 사용하여 미디어 재생, 캡쳐, 편집, low-level의 처리를 수행할 수 있다. 또한 효율적으로 미디어 에셋을 로드하고 HTTP 라이브 스트..
[iOS] AVKit, AVPlayerViewController AVKit Create view-level services for media playback, complete with user controls, chapter navigation, and support for subtitles and closed captioning. 미디어 재셍을 위한 view-level 서비스를 생성하고, 사용자 제어, chapter navigation(?), 자막, closed caption(??) 지원 기능을 제공한다. AVKit 프레임워크는 영상 콘텐츠 재생을 위한 고급 인터페이스를 제공한다. AVKit은 AVFoundation 위에 구축된 보조 프레임워크이다. AVKit을 사용하면 플랫폼의 재생 환경과 맞는 player 인터페이스를 쉽게 제공할 수 있다. AVKit은 AVFo..
[iOS] Gesture Recognizer Gesture Recognizer Gesture Recognizer는 여러 제스처 관련 이벤트를 인식할 수 있다. 특정 제스처 이벤트가 일어날 때마다 각 타깃에 맞는 액션 메시지를 보내서 제스처 관련 이벤트를 처리할 수 있다. UIGestureRecognizer The base class for concrete gesture recognizers. class UIGestureRecognizer : NSObject UIGestureRecognizer 클래스는 특정 Gesture Recognizer에 대한 동작을 정의한다. 또한 델리게이트 객체를 활용해 일부 동작을 더욱 세밀하게 customize 할 수 있다. UIGestureRecognizer의 하위 클래스 1. UITapGestureRecognizer ..
[iOS] 세그 (Segue) 세그 (Segue) 스토리보드에서 뷰 컨트롤러 사이의 화면전환을 위해 사용하는 객체 별도의 코드 없이도 스토리보드에서 세그를 연결해 뷰 컨트롤러 사이의 화면 전환을 구현할 수 있다. UIStoryboardSegue An object that prepares for and performs the visual transition between two view controllers. class UIStoryboardSegue : NSObject UIStoryboardSegue 클래스는 UIKit에서 사용할 수 있는 표준 화면전환을 위한 프로퍼티와 메소드를 포함하고 있다. 또한 커스텀 전환을 정의하기 위해 서브 클래스를 구현해 사용할 수 있다. 필요에 따라 UIViewController의 performSegue..
[iOS] UIRefreshControl UIRefreshControl A standard control that can initiate the refreshing of a scroll view’s contents. 뷰를 아래로 당기며 새로고침하는 기능을 추가하고 싶을 때 사용 class UIRefreshControl : UIControl UIButton, UISwitch 처럼 UIControl 을 상속받는다. (타겟-액션 디자인 패턴 활용) When the user drags the top of the scrollable content area downward, the scroll view reveals the refresh control, begins animating its progress indicator, and notifies you..
[iOS] 뷰 회전 관련 작업 : viewWillTransition viewWillTransition(to:with:) Notifies the container that the size of its view is about to change. 뷰의 사이즈가 바뀔 때 호출되는 함수이다. func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) size : 컨테이너 뷰의 새로운 사이즈 coordinator : 사이즈 변화를 관리하는 transition coordinator object (?????) You can use a transition coordinator object to perform tasks that are related to a transit..
[iOS] View의 Life-Cycle (생명주기) 뷰의 상태변화 감지 메소드 뷰가 화면에 보여지는 상태의 변화나, 뷰의 레이아웃에 변화가 생기면 뷰 컨트롤러는 그에 맞는 메소드를 호출한다. 뷰의 Life-Cycle func viewDIdLoad() 뷰 계층이 메모리에 로드된 직후 호출되는 메소드 메모리에 처음 로딩될 때 1회 호출되는 메소드로, 메모리 경고로 뷰가 사라지지 않는 이상 다시 호출되지 않음 ⬇️ func viewWillAppear(_ animated: Bool) 뷰가 뷰 계층에 추가되고, 화면에 표시되기 직전에 호출되는 메소드 다른 뷰로 이동했다가 되돌아오면 다시 호출되는 메소드 화면이 나타날 때마다 수행해야 하는 작업을 이 함수 안에 구현하면 좋아용 ⬇️ func viewDidAppear(_ animated: Bool) 뷰가 뷰 계층에 추..
[iOS] UIVisualEffectView UIVisualEffectView An object that implements some complex visual effects. class UIVisualEffectView : UIView let visualEffectView: UIVisualEffectView = UIVisualEffectView(effect: UIBlurEffect(style: .regular)) 뷰에 블러 효과를 주고 싶을 때 사용하는 클래스! 왼쪽부터 차례로 style을 regular, dark, prominent 로 적용한 화면이다.