- Today
- Total
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- SQL
- 딥러닝
- scheduledTimer
- tapply
- decode
- ReLU
- MVC
- deeplearning
- SWIFT
- Python
- Linux
- struct
- rest api
- barplot
- r
- sigmoid
- cocoapods
- HTTP
- 오블완
- ios
- rxswift
- substr
- 티스토리챌린지
- 시각화
- 명령어
- Optional
- Observable
- 연산자
- swiftUI
- Request
목록iOS/SwiftUI (5)
iOS 개발 기록 블로그
🧑💻 코드 import SwiftUI public struct SampleView: View { @State var title: String = "Hi, guys" @Environment(\\.presentationMode) var presentationMode: Binding public var body: some View { VStack { Text(title) .font(.system(size: 26, weight: .bold)) .foregroundColor(.black) .padding() NavigationLink { BaseWebView(url: "") } label: { Text("구글 웹사이트") .padding() } Spacer() } .navigationBarTitleDisplay..

https://developer.apple.com/documentation/swiftui/view/navigationbartitledisplaymode(_:) navigationBarTitleDisplayMode(_:) | Apple Developer Documentation Configures the title display mode for this view. developer.apple.com 🚨 문제 SwiftUI에서 네비게이션바를 커스텀하기 위해 백 버튼을 숨기고 아래에 뷰를 작성하면 네비게이션바와 본문 뷰 사이에 알 수 없는 여백이 있는 경우가 있습니다. .navigationBarBackButtonHidden() 🧑💻 코드 public struct SampleView: View { @State..

🌁 배경 SwiftUI에서 NavigationLink를 활용해서 View를 Push하는 경우 NavigationLink { SampleView() } label: { Text("Push Sample View") } 아래 이미지처럼 네비게이션바 topLeading 위치에 뒤로가기 버튼이 자동으로 노출됩니다. 이를 없애고 네비게이션바를 커스텀해주고 싶을때 아래 코드를 사용해서 뒤로가기 버튼을 지울 수 있습니다. .navigationBarTitleDisplayMode(.inline) .navigationBarBackButtonHidden() 🚨 문제 발생 그런데 이때 문제가 발생하는데 뒤로가기 스와이프 제스처가 동작하지 않는다는 것입니다. ✅ 해결 방법 아래 extension만 추가해주면 정상적으로 뒤로가기 ..

https://developer.apple.com/documentation/swiftui/presentationmode PresentationMode | Apple Developer Documentation An indication whether a view is currently presented by another view. developer.apple.com NavigationBar에 topLeading 위치에 toolbar로 뒤로가기 이미지를 추가한 후 버튼 이벤트를 간단히 추가하는 방법이 있습니다. import SwiftUI public struct SampleView: View { @State var title: String = "안녕하세유, 반가워유" @Environment(\.present..

예를 들어 위와 같은 화면에 버튼이 있다고 생각해보자. 기본적으로 "선택하기" 부분만 클릭이 되고 나머지 백그라운드 부분이 클릭되지 않는다. 이 경우에 아래와 같이 하면 백그라운드 영역도 클릭이 가능하게 된다. struct ChooseButtonView: View { var body: some View { Button(action: { print("Tapped the Button!") }, label: { Text("선택하기") .frame(maxWidth: .infinity) .padding() .background(Color.accentColor) .foregroundColor(.white) .cornerRadius(12) .padding(.horizontal, 20) }) } } Button을 타이..