MapKit (22)
LocationListView Alert 설정 기존에 print로 해두었던 부분에 대해 Alert로 바꾸도록 한다. // LocationListVM @Published var alertItem: AlertItem? func getCheckedInProfilesDictionary() { CloudKitManager.shared.getCheck...
LocationListView Alert 설정 기존에 print로 해두었던 부분에 대해 Alert로 바꾸도록 한다. // LocationListVM @Published var alertItem: AlertItem? func getCheckedInProfilesDictionary() { CloudKitManager.shared.getCheck...
Dynamic Type 이어서 하도록 한다. 이젠 Modal에 관해서 해본다. 이렇게 Font 확대시 Modal이 깨지고 있는데 이부분을 고쳐보도록 한다. 우선 ProfileSheetView를 하나 만들어 주었다. 이건 폰트 사이즈가 커졌을때 쓰일 별도의 View이다. ProfileModalView를 복사해서 조금 변형을 해주면 된다. (...
Dynamic Type Dynamic Type에 대한 참고는 여기 간단하게 정리하면 설정에서 Dynamic Type을 통해 font size를 조절할 수 있다. Accessibility Docs Dynamic Type sizes Docs PSDPFKit Blog - Dynamic Type Stats 여기도 참고하면 좋다. 우선 DummyD...
VoiceOver 기능 사용하기. 이전글에서 해본적이 있긴한데, 여기선 아마 간단하게 할 듯 참고자료 2019 - Accessibility in SwiftUI 2021 - SwiftUI Accessibility: Beyond the basics Human InterfaceGuidelines - Accessibility How to Navigate ...
Launch Screen 만들기 예전엔 info.plist 라는 파일이 있었으나 지금은 그냥 프로젝트에서 info가 있어서 거기서 수정을 하면 된다. 여기서 추가해서 이렇게 Image 이름을 해주면 된다. 이때 이미지 이름을 이렇게 한 이유는 이렇게 Asset에 있는걸 그대로 썼기 때문 그리고 Image respects safe a...
체크인한 profile을 count하는 함수 만들기 이전글에서 우리는 하드코딩으로 숫자를 99로 적어놨던걸 알 수 있다. 이젠 체크인을 한 사람들이 몇명인지를 카운트해주는 함수를 만들어서 하드코딩 했던 부분의 기능을 구현하려고 한다. 우선 CloundKitManager에서 getCheckedInProfilesDictionary의 내용을 그대로 복사...
Annotaion 적용하기 기존에 LocationMapView를 보게되면 기본적으로 자체 제공하는 MapMarker를 사용했었다. Map(coordinateRegion: $viewModel.region, showsUserLocation: true, annotationItems: locationManager.locations) { location i...
Custom Map Annotation Annotation을 만들어 보려고 한다. struct MapBalloon: Shape { func path(in rect: CGRect) -> Path { return path } } 여기서 한가지 흥미로운 점이라면 View가 아닌 Shape로 만들었다는 것이다. ...
LocationListViewModel 만들기 이전글에서 작성한 코드와 관련된 작업을 하기위해 ViewModel을 만들어 준다. 그리고 새로 Re-Group을 해주는데 LocationListView, LocationCell, LocationListVM 이렇게 세개를 LocationListView라는 폴더를 만들고 넣어준다. 그리고 아래와 같...
클라우드에 새로운 Field 추가하기 CloudKit 대시보드에서 새로운 데이터 필드를 추가하고, 이를 검색 가능하도록 설정하는 과정을 정리해본다. 우선 isCheckedInNilCheck 라는 필드를 만들어 준다. 말그대로 체크인이 NIL인지 아닌지를 확인하는 필드이다. Boolean이 없기때문에 아주 기본적인 방법 0,1로 true/fal...