IOS 65

[iOS / Swift] Memory Safety

Memory Safety(메모리 안전) By default, Swift prevents unsafe behavior from happening in your code. For example, Swift ensures that variables are initialized before they’re used, memory isn’t accessed after it’s been deallocated, and array indices are checked for out-of-bounds errors. 기본적으로 Swift는 코드에서 안전하지 않은 동작이 발생하는 것을 방지합니다. 예를 들어, Swift는 변수가 사용되기 전에 초기화되고, 할당이 해제된 후 메모리에 액세스되지 않으며, 범위를 벗어난 에러에 대해..

Swift Langage Guide 2022.08.26

[iOS / UIKit] View Controller Life Cycle(뷰 컨트롤러 생명 주기)

오늘 설명할 내용은 view controller life cycle입니다. iOS 앱 개발에 있어서 필수적으로 알아야 하는 개념입니다. 일반적으로 iOS 앱 화면에 view controller를 띄우는데 view controller에는 생명주기(life cycle)가 있고, 이를 고려해서 앱을 개발해야 합니다. view controller의 생명주기를 도식화하면 다음과 같습니다. 생명주기와 관련된 메서드들에 대해서 알아보겠습니다. 1. init(coder:) View Controller을 storyboard로 생성할 경우, view controller의 객체가 생성될 때 초기화 작업을 하는 메서드가 바로 init(coder:) 메서드입니다. init(coder:) 메서드는 view controller가 ..

UIKit 2022.03.25

[iOS / HIG] Sheets

Sheets A sheet helps people perform a distinct task that’s related to the parent view without taking them away from their current context. For example, Mail uses a sheet to help people compose an email without leaving their mailboxes, and Translate uses a sheet to display a dictionary view that helps people define the word they want to translate. 시트를 통해 사용자는 현재 컨텍스트에서 사용자를 제거하지 않고 상위 보기와 관련된 고유한..

HIG 2022.03.03