전체 글533 [Swift] Property Wrapper Properties — The Swift Programming Language (Swift 5.6) Properties Properties associate values with a particular class, structure, or enumeration. Stored properties store constant and variable values as part of an instance, whereas computed properties calculate (rather than store) a value. Computed properties a docs.swift.org Property Wrapper Property Wrapper는 프로퍼티를 정의하는 코드와 프로퍼티가 어떻게 저장되는지 관리하는.. 2022. 2. 13. [iOS] Stretchable Image를 이용해 이미지 늘리기 (feat. 9-patch) Apple Developer Documentation developer.apple.com Stretchable Image를 이용해 이미지 늘리기 안드로이드의 9-Patch 이미지와 유사한 기능으로 image를 9부분으로 나누어 자유롭게 늘리거나 줄이는 것이 가능하다. Top, Bottom, Left, Right 4가지 Inset으로 나뉜다. 각 Inset은 Image에서 이미지를 늘리더라도 늘어나지 않는 공간을 지정하는 역할을 한다. Top, Bottom Inset의 공간은 고정된 height를 유지하고, Left, Right Inset의 공간은 고정된 width를 유지한다. 각 Inset이 겹치는 코너들은 항상 고정된 크기를 가지게 된다. 코드 상에서는 UIImage.resizableImage(with.. 2022. 2. 8. [iOS Issue] CGAffineTransform에서 scale을 0으로 설정하면 애니메이션이 동작하지 않는 현상 Problem when animating a UIView to scale to zero using CGAffineTransform on iOS I was recently working on an application which required me to display an animation which scales a UIView down to zero. The approach I took… medium.com 원인 설명 글이 길지만 가장 중요한 내용만 요약하자면 scale factor를 0으로 설정하게 되면 수식에서 divide by zero 계산을 포함시키기 때문에 원하는 결과가 나오지 않게 되는 것이 원인이다. Solution scale factor를 0이 아닌 0에 근접한 값으로 설정하고 UIVie.. 2022. 2. 6. [iOS] CoreData - (2) ※출처 - 꼼꼼한 재은씨의 Swift: 실전편 싸니까 믿으니까 인터파크도서 제대로 스위프트를 즐기는 방법 이 책은 전반적으로 하나의 메인 프로젝트를 완성해나가는 동시에 각 주제별로 소규모 앱을 만들면서 기능을 익히도록 구성되어 있습니다. 따라서 특정 주제나 book.interpark.com 코어 데이터 이해하기 코어 데이터는 여러 계층에서 서로 협력하는 다양한 객체들로 이루어져 있다. 객체 그래프 관리자(Object Graph Manager) 애플 가이드에선 코어 데이터를 '애플리케이션에서 모델(Model) 계층의 객체를 관리하는 데 사용하는 프레임워크이자, 라이프 사이클이나 영속성 관리를 위한 기능을 제공하는 객체 그래프 관리자(Object Graph Manager)'로 정의하고 있다. 코어 데이터는 .. 2022. 2. 5. 이전 1 ··· 32 33 34 35 36 37 38 ··· 134 다음