본문 바로가기

반응형

Swift

(7)
[Swift] xcode 단축키 1. swift ui 표시 command + shift + L 2. 주석 command + /
[Swift] url 자료 1. Swift UI https://developer.apple.com/tutorials/swiftui Introducing SwiftUI | Apple Developer Documentation SwiftUI is a modern way to declare user interfaces for any Apple platform. Create beautiful, dynamic apps faster than ever before. developer.apple.com 2. Swift 문서 (한국어) https://bbiguduk.gitbook.io/swift/
[Swift] 구조체 및 preview // // MyStruct.swift // MyFirstApp // // Created by 정나원 on 12/14/23. // import SwiftUI struct UserInfo { } struct MyStruct: View { let name: String let age: Int? var body: some View { VStack { Text(name) Text(age?.description ?? "100") Button { sayMyName(with: name) } label: { Text("Button") } } } func sayMyName(with name: String) { print(name) } } struct MyStruct_Previews: PreviewProvider{ stat..
[Swift] 교집합, 합집합, [String:String] import SwiftUI struct Variable: View { let name = "nawon" let age:Int = 20 let hasJob: Bool = true let enkoDictionary = ["Apple":"사과", "Banana":"바나나", "Coconut":"코코넛"] let houseAnimal: Set = ["🐶", "🐱","🐹"] let farmAnimal: Set = ["🐻","🐼","🐮", "🐱","🐹"] var body: some View { VStack { Text(name) Text(name) Text("hello, \(name) \(age) \(hasJob.description)") Text(enkoDictionary["Apple"]!) Text(houseA..
[Swift] 변수와 text 문구 표시 및 Bool일때 import SwiftUI struct Variable: View { let name = "nawon" var body: some View { VStack { Text(name) Text(name) Text("hello, \(name)") } } } #Preview { Variable() } import SwiftUI struct Variable: View { let name = "nawon" let age:Int = 20 let hasJob: Bool = true var body: some View { VStack { Text(name) Text(name) Text("hello, \(name) \(age) \(hasJob.description)") } } } #Preview { Variable() } ..
[Swift] xcode 와 SF Symbols 설치 1. xcode 설치 https://developer.apple.com/download/applications/ 2. SF Symbols 설치 https://developer.apple.com/sf-symbols/ SF Symbols - Apple Developer With over 5,000 symbols, SF Symbols is a library of iconography designed to integrate seamlessly with San Francisco, the system font for Apple platforms. developer.apple.com
[Swift] Swift 애플 공식 문서 1. 공식사이트 https://developer.apple.com/swift/ Swift - Apple Developer Swift is a powerful and intuitive programming language for iOS, iPadOS, macOS, tvOS, and watchOS. Writing Swift code is interactive and fun, the syntax is concise yet expressive, and Swift includes modern features developers love. developer.apple.com https://docs.swift.org/swift-book/documentation/the-swift-programming-language/

반응형