- 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 |
- tapply
- Linux
- SQL
- scheduledTimer
- MVC
- sigmoid
- barplot
- ios
- 티스토리챌린지
- 명령어
- swiftUI
- 연산자
- struct
- Request
- decode
- rest api
- rxswift
- deeplearning
- SWIFT
- substr
- 딥러닝
- 오블완
- 시각화
- cocoapods
- HTTP
- r
- Observable
- Optional
- Python
- ReLU
목록iOS (61)
iOS 개발 기록 블로그
최근에 Xcode를 사용하여 iOS 디바이스를 연결하고 빌드하려고 할 때, 아래와 같은 문제가 발생했습니다. 환경Xcode 버전: 16.2 (Xcodes 앱을 사용하여 설치)디바이스 OS 버전: iOS 14.6 문제디바이스를 케이블로 연결하고 빌드를 시도했으나, 아래와 같은 팝업 메시지가 나타나며 빌드가 실패했습니다. Could not locate device support filesYou may be able to resolve the issue by installing the latest version of Xcode from the Mac App Store or developer.apple.com. 원인이 오류는 Xcode에 연결된 디바이스의 OS 버전에 대한 지원 파일이 없을 때 발생합니다. 이는..
에러 로그*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Expected dequeued view to be returned to the collection view in preparation for display. When the collection view's data source is asked to provide a view for a given index path, ensure that a single view is dequeued and returned to the collection view. Avoid dequeuing views without a request from the..
에러 상황final class StepView: UIView { // MARK: - Properties private var isFitnessAuthorized: Bool // MARK: - Initializer override init(frame: CGRect) { super.init(frame: frame) self.setupView() self.bindView() self.isFitnessAuthorized = PermissionManager.getPedometerAuthStatus() } // MARK: - Setup View private func setupView() { ..
https://github.com/ReactorKit/ReactorKit/tree/master/Examples/Counter/Counter ReactorKit/Examples/Counter/Counter at master · ReactorKit/ReactorKitA library for reactive and unidirectional Swift applications - ReactorKit/ReactorKitgithub.comCounter 예제와 같이 봅니다. ReactorKit에서 @Pulse는 특정 상태 변화를 옵저빙(감지)하기 위해 사용되는 프로퍼티 래퍼입니다. @Pulse를 사용하면 특정 상태 값이 변경될 때만 옵저버가 트리거됩니다. 이는 주로 일회성 이벤트나 특정 상태 변화에 반응하는 경우에..
🧑💻 코드 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을 타이..
navigationBarItems 네비게이션 바 아이템을 여러개 쓰면 아이템끼리 간격을 조절하고 싶을 경우가 있다. 이때 아래와 같이 "imageInsets" 프로퍼티를 조정해서 쓰면 된다. // adjust right navigationBarItems space self.yourButtonName.imageInsets = UIEdgeInsets(top: 0, left: 15, bottom: 0, right: 0) yourButtonName을 왼쪽으로부터 15만큼 떨어지게 한다. Inset() 하면 괄호 안에 숫자만큼 간격을 두는 것. Apple Developer Documentation developer.apple.com