반응형

Xcode 3

SwiftUI에서 UIkit, StoryBoard 사용하기

SwiftUI에서 UIkit 사용하기 SwiftUI에서 UIkit를 사용하기 위해서는 UIViewRepresentable을 채택하는 struct를 구현하면 됩니다. UIViewRepresentable을 채택하게 되면 필수로 구현해야 하는 makeUIView와 updateUIView가 있고 UIViewType을 원하는 UIkit의 View로 변경하면 됩니다. UIViewRepresentable // 구현 struct SwiftUIView: UIViewRepresentable { func makeUIView(context: Context) -> UIViewType { let view = UIViewType() return view } func updateUIView(_ view: UIViewType, con..

ios/swiftUI 2022.02.04

[Swift] 백준 swift로 알고리즘 문제 푸는법 - readline(), Xcode Swift로 커맨드 라인 입력값 받기

알고리즘 문제를 풀어보려고 하는데 문제를 풀어도 어떤식으로 제출을 해야 하는지에 대한 글입니다. 1. 문제 풀기 위한 Xcode 세팅 1. 먼저 xcode를 열어 new project를 만듭니다. 2. macOS에서 Commend Line Tool을 선택합니다. 3. main.swift 파일에서 문제를 푸시면 됩니다! Playground로 하지 않고 Command Line Tool로 하는 이유는 아래를 보면 알 수 있습니다. 2. 입력값을 받는 문제 문제중에 입력값을 받는 문제들이 있습니다. 이 입력값을 받기 위해 일반 Playground를 사용하지 않고 Command Line Tool을 사용합니다. 입력값을 받기 위해서는 readLine()을 호출하면 됩니다. 실행을 하게되면 먼저 1. Hello, W..

Algorithm/BackJoon 2022.01.23

Xcode 13.2 - Internal error: missingPackageDescriptionModule

Xcode 13.2 버전 업데이트 후 발생하는 오류 애플 공식 답변 - We're currently investigating this issue — thank you to those who have filed bug reports so far. To workaround this issue, please re-download Xcode 13.2 directly from Releases section of the Apple Developer website. This information is also captured in the Xcode 13.2 Release Notes. If you still encounter this issue after downloading that specific version o..

ios/Xcode 2021.12.18
반응형