분류 전체보기60 SwiftUI Tutorial 5- Drawing paths and shapes 1. Create drawing data for a badge viewimport CoreGraphicsstruct HexagonParameters { struct Segment { let line: CGPoint let curve: CGPoint let control: CGPoint } static let adjustment: CGFloat = 0.085 static let segments = [ Segment( line: CGPoint(x: 0.60, y: 0.05), curve: CGPoint(x: 0.40, y: 0.05), control: CGPoint(x:.. 2024. 7. 7. SwiftUI Tutorial 4 - Handling user input 1. Mark favorite landmarks모델 클래스에 isFavorite 프로퍼티를 추가한다.struct Landmark: Hashable, Codable, Identifiable { var id: Int var name: String var park: String var state: String var description: String var isFavorite: Bool private var imageName: String var image: Image { Image (imageName) } private var coordinates: Coordinates var locationCoordinate: CLLo.. 2024. 7. 6. SwiftUI Tutorial 3 - Building lists and navigation 1. Create a landmark model먼저 튜토리얼 페이지에서 제공하는 데이터 파일들을 프로젝트에 다운 받은 후 데이터를 담을 구조체를 만든다.연산 프로퍼티인 image 와 locationCoordinate도 추후에 용이하게 써먹기 위해 만들어 놓는다.import Foundationimport SwiftUIimport CoreLocationstruct Landmark: Hashable, Codable { var id: Int var name: String var park: String var state: String var description: String private var imageName: String var image: Image { .. 2024. 7. 5. SwiftUI Tutorial 2 - Creating and combining views 2 5. Use SwiftUi viewx from other frameworksMapKit 을 import 해서 Map 뷰를 써본다.6. Compose the detail view이제 custom한 뷰들을 조합한다. 눈에 띄는 것이 두가지. 첫째, Vstack(Hstack) 안에서 offset과 padding을 통해 다른 뷰의 영역 위로 이동할 수 있다. CircleImage가 MapView 위를 지나가는 것을 볼 수 있다.괜히 Stack 이라는 단어를 쓴 것이 아니었구나. 추측컨데 아래의 선언된 것이 위를 차지하는 듯하다. 둘째, 공통 속성일 경우 상위의 view 에서 속성을 지정할 수 있다. Text 뷰가 두개가 있지만 상위 뷰인 HStack에서 font와 foregroundStyle 속성을 선언할 수 .. 2024. 7. 4. SwiftUI Tutorial 2 - Creating and combining views 1 1. Create a new project and explore the canvasSwiftUI 튜토리얼 진행 시 macOS Sonoma 이상이어야 문제없이 진행 가능 튜토리얼대로 프로젝트를 생성 후 보게 되는 파일.@main 속성은 앱의 진입 포인트를 의미한다고 한다. Preview 기능도 있다. 역시 보면서 해야 맘이 편하다.. 2. Customize the text view source editor, canvas, inspectors 의 조합으로 코딩. 우선 Inspector 를 써보자 캔버스 화면 아래 마우스 커서 버튼을 누른 후 Command + Control 과 함께 클릭하면 아래 창이 뜬다. 그 중에 Show SwiftUI Inspector 클릭 이곳에서 수정하면 바로 관련된 코드가 추가.. 2024. 7. 3. SwiftUI Tutorial 1 - SwiftUI overview 애플 개발자 문서에서 SwiftUI Tutorial 을 시작하기 전에 정리해놓은 SwftUI의 개요 4가지 - Declarative syntax—Define which views appear onscreen using simple Swift structures. Flutter, React 와 같이 최근 프론트엔드 프레임워크들 사이에서 자주 채용되는 방식인 '선언적 구문'을 통한 프로그래밍 A compositional API—Quickly create and iterate your user interface using built-in views and modifiers. Compose more complex views by combining simpler views. compositional 이란 단어의.. 2024. 7. 2. [Android] Dependency 'androidx.activity:activity:1.8.0' requires libraries or apps that depend on it to compile against version 34 or later 안드로이드 스튜디오에서 SDK 버전으로 33으로 프로젝트를 생성하고 바로 빌드해봤는데 에러가 발생했다 Dependency 'androidx.activity:activity:1.8.0' requires libraries or apps that depend on it to compile against version 34 or later of the Android APIsAsk Question 에러 문구처럼 SDK 버전을 34 으로 올릴 수도 있겠지만 프로젝트 생성을 버전 33으로 한 입장에서 SDK 버전 하나만 올리는 것보다 34를 요구하는 저놈의 버전을 낮추는 게 좋지 않을까 싶어서 찾아봤다. implementation 'com.google.android.material:material:1.11.0' //.. 2024. 4. 23. [Flutter/Xcode] 여러 타겟 동시에 version 관리 - Generated.xcconfig Flutter 프로젝트에서 ios 빌드하면서 AppStore에 배포할 때 자꾸 아래와 같은 경고 이메일이 날라왔다. ITMS-90473: CFBundleVersion Mismatch - The CFBundleVersion value '1' of extension 'Runner.app/PlugIns/ImageNotification.appex' does not match the CFBundleVersion value '181' of its containing iOS application 'Runner.app'.ITMS-90473: CFBundleShortVersionString Mismatch - The CFBundleShortVersionString value '1.0' of extension 'Runne.. 2024. 4. 18. [UIKit/Storyboard] UITableView didSelectRowAt 메서드 func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { print("hi")}테이블 뷰의 셀을 클릭해도 select 이벤트를 관리하는 위 메서드가 호출되지 않는다.. 일단 아래처럼 Outlet 연결은 되어 있다.class FlightListViewController : UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet weak var tableView: UITableView! 그리고 Delegate, DataSource 연결도 해놨다.override func viewDidLoad() { super.viewDid.. 2024. 4. 9. 이전 1 2 3 4 5 6 7 다음