MapKit (24)
CloudKitManager 코드 다듬기 1. 관계 정보 추출 로직 최적화 // Before operation.recordFetchedBlock = { record in // Build our dictionary let profile = DDGProfile(record: record) guard let locationRe...
CloudKitManager 코드 다듬기 1. 관계 정보 추출 로직 최적화 // Before operation.recordFetchedBlock = { record in // Build our dictionary let profile = DDGProfile(record: record) guard let locationRe...
LocationDetailView 보강 Extension의 문제점? extension LocationDetailView { final class LocationDetailViewModel: ObservableObject { // 생략 } } 이렇게 이전글에서 extension을 사용해서 View와 ViewModel을...
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로 만들었다는 것이다. ...