iOS
-
Spacer Spacer | Apple Developer Documentation A flexible space that expands along the major axis of its containing stack layout, or on both axes if not contained in a stack. developer.apple.com 주축을 포함하는 Stack Layout에서 팽창하거나 Stack 안에서 두 축 위에 포함되지 않는 유연한 빈 공간 Spacer는 뷰와 대응하여 내용 없이 최대로 팽창하며 생성할 수 있습니다. 아래는 Spacer를 활용한 예시 코드입니다. 1. Spacer를 사용하기 전의 코드 struct ChecklistRow: View { let name: String var ..
[SwiftUI] 공식문서 파헤치기 (3) [Spacer / Divider]Spacer Spacer | Apple Developer Documentation A flexible space that expands along the major axis of its containing stack layout, or on both axes if not contained in a stack. developer.apple.com 주축을 포함하는 Stack Layout에서 팽창하거나 Stack 안에서 두 축 위에 포함되지 않는 유연한 빈 공간 Spacer는 뷰와 대응하여 내용 없이 최대로 팽창하며 생성할 수 있습니다. 아래는 Spacer를 활용한 예시 코드입니다. 1. Spacer를 사용하기 전의 코드 struct ChecklistRow: View { let name: String var ..
2023.08.12 -
HStack : 수평방향(Horizontal)으로 Stack을 쌓는 View HStack | Apple Developer Documentation A view that arranges its subviews in a horizontal line. developer.apple.com var body: some View { HStack( alignment: .top, spacing: 10 ) { ForEach( 1...5, id: \.self ) { Text("Item \($0)") } } } Result Code에서 ForEach문이 등장한다. ForEach : 식별된 데이터의 기본 컬렉션에서 요구에 따라 View를 계산하는 Structure ForEach | Apple Developer Documenta..
[SwiftUI] 공식문서 파헤치기 (2) [Stack]HStack : 수평방향(Horizontal)으로 Stack을 쌓는 View HStack | Apple Developer Documentation A view that arranges its subviews in a horizontal line. developer.apple.com var body: some View { HStack( alignment: .top, spacing: 10 ) { ForEach( 1...5, id: \.self ) { Text("Item \($0)") } } } Result Code에서 ForEach문이 등장한다. ForEach : 식별된 데이터의 기본 컬렉션에서 요구에 따라 View를 계산하는 Structure ForEach | Apple Developer Documenta..
2023.08.12 -
User Notifications User Notifications | Apple Developer Documentation Push user-facing notifications to the user’s device from a server, or generate them locally from your app. developer.apple.com - 사용자 기기에 대면으로 서버나 로컬에서 알림을 전송해 주는 Framework UnUserNotificationCenter UNUserNotificationCenter | Apple Developer Documentation The central object for managing notification-related activities for your a..
[Swift] User NotificationsUser Notifications User Notifications | Apple Developer Documentation Push user-facing notifications to the user’s device from a server, or generate them locally from your app. developer.apple.com - 사용자 기기에 대면으로 서버나 로컬에서 알림을 전송해 주는 Framework UnUserNotificationCenter UNUserNotificationCenter | Apple Developer Documentation The central object for managing notification-related activities for your a..
2023.08.06 -
SwiftUI - User Interface와 모든 플랫폼에서의 동작을 선언합니다. - 앱의 UserInterface에서 정의할 때 View, Control 그리고 Layout을 제공 - Framework에서는 Tab, Gesture 그리고 다른 입력의 형태의 이벤트 Handler를 제공, 앱 Model에서 사용자들이 보고 상호 작용할 수 있는 데이터로부터 흐름을 관리하는 도구 - 앱 구조에서 사용하는 App 프로토콜을 정의하고 앱의 사용자 인터페이스로 구성된 뷰들이 포함되어 있는 Scene과 함께 채움 - View Protocol을 채택한 View를 생성하고 Stack, List 등을 사용하여 Text와 Image를 표시하기 위해 SwiftUI View를 구성 SwiftUI | Apple Develop..
[SwiftUI] 공식문서 파헤치기 (1) [SwiftUI]SwiftUI - User Interface와 모든 플랫폼에서의 동작을 선언합니다. - 앱의 UserInterface에서 정의할 때 View, Control 그리고 Layout을 제공 - Framework에서는 Tab, Gesture 그리고 다른 입력의 형태의 이벤트 Handler를 제공, 앱 Model에서 사용자들이 보고 상호 작용할 수 있는 데이터로부터 흐름을 관리하는 도구 - 앱 구조에서 사용하는 App 프로토콜을 정의하고 앱의 사용자 인터페이스로 구성된 뷰들이 포함되어 있는 Scene과 함께 채움 - View Protocol을 채택한 View를 생성하고 Stack, List 등을 사용하여 Text와 Image를 표시하기 위해 SwiftUI View를 구성 SwiftUI | Apple Develop..
2023.08.05 -
@dis cardableResult - 함수의 반환 값을 무시해도 된다고 선언할 때 사용 @discardableResult func discardableResultSay(_ something: String) -> String{ print(something) return something } discardableResultSay("hi") // "hi"
[Swift] @discardableResult@dis cardableResult - 함수의 반환 값을 무시해도 된다고 선언할 때 사용 @discardableResult func discardableResultSay(_ something: String) -> String{ print(something) return something } discardableResultSay("hi") // "hi"
2023.07.26 -
Date | Apple Developer Documentation A specific point in time, independent of any calendar or time zone. developer.apple.com Date 날짜와 시간을 다루기 위해 기본적으로 필요한 Date함수 // 현재 시간 출력 let currentDate = Date() print(currentDate) // 2023-07-15 05:31:36 +0000 // Unix 시간(1970년 1월 1일 00:00:00 UTC) let unixDate = Date().timeIntervalSince1970 print(unixDate) //1689403952.721513 // 현재 시간에서 60초(1분)이후 let 1minAfter..
[Swift] Date / DateFormatterDate | Apple Developer Documentation A specific point in time, independent of any calendar or time zone. developer.apple.com Date 날짜와 시간을 다루기 위해 기본적으로 필요한 Date함수 // 현재 시간 출력 let currentDate = Date() print(currentDate) // 2023-07-15 05:31:36 +0000 // Unix 시간(1970년 1월 1일 00:00:00 UTC) let unixDate = Date().timeIntervalSince1970 print(unixDate) //1689403952.721513 // 현재 시간에서 60초(1분)이후 let 1minAfter..
2023.07.15