본문 바로가기

ios83

[iOS] iOS에서의 대표적인 Design Pattern들 https://howtoinswift.tech/blog/iOS/All-iOS-Design-patterns-you-should-know All iOS Design patterns you should know Design patterns are definitely something you must consider learning one day howtoinswift.tech 1. MVC (Model - View - Controller) MVC는 UI에서 data의 표현을 분리하는 software architecture 패턴이다. iOS에서 MVC는 code를 구성하고 concern들을 분리해내는데 쓰인다. 제일 대표적인 예시가 UIViewController이며 MVC에서 Controller에 해당한다. 2... 2023. 1. 21.
[iOS] nibName에 따른 ViewController 초기화 https://developer.apple.com/documentation/uikit/uiviewcontroller/1621359-init Apple Developer Documentation developer.apple.com https://developer.apple.com/documentation/uikit/uiviewcontroller/1621487-nibname Apple Developer Documentation developer.apple.com init(nibName:bundle:) 지정된 bundle에서 nibName을 통해 nib파일을 찾아 새로운 UIViewController 인스턴스를 만들어내는 함수 Discussion UIViewController의 designated initia.. 2023. 1. 21.
[iOS] UIFont의 property들 UIFont Explained Visually I feel like UIFont’s read-only properties go forgotten easily. When you create a new font object, five measurement properties will be… medium.com UIFont의 property들 lineHeight: text line들의 높이 lineHeight = abs(ascender) + abs(decender) acender: baseline을 기준으로 가장 높은 지점의 offset값 decender: baseline을 기준으로 가장 낮은 지점의 offset값 capHeight: 대문자 높이 xHeight: 소문자 "x"의 높이 leading: line간.. 2022. 12. 31.
[iOS] OOM (Out of Memory) crash case - 1 The case of iOS OOM Crashes at Compass Context medium.com 위의 The case of iOS OOM Crashes at Compass 포스팅을 번역한 글입니다. 메모리 관리란 무엇인가? 메모리는 우리의 디바이스에 저장된 모든 정보들에 들어있는 모든 메카니즘을 참조한다. 아이폰은 2가지의 데이터를 저장하는 방식을 가지고 있다. 첫 번째는 아이폰의 전원이 꺼져도 데이터를 유지하는 hard drive나 디스크에 저장하는 방식이고, 두 번째는 디바이스가 꺼지면 데이터가 사라지는 RAM이라고 하는 저장장치에 저장하는 방법이다. 디바이스에서 앱이 실행될 때, 시스템은 메모리를 할당할 heap이라는 RAM의 영역을 요청하게 된다. 이곳이 바로 reference type 변.. 2022. 11. 26.