ios14

diffable data source section header blinks during update

我与影子孤独终老i 提交于 2021-01-05 13:19:37
问题 I'm currently facing the issue, that when applying a new snapshot to my current data source, that the header, footer and decoration views are not part of the collection view's subviews, which can be noticed as a weird flicker. Did anyone face that issue before? I update the data source via: var snapshot = NSDiffableDataSourceSnapshot<Section, Item>() snapshot.appendSections(Sections.allCases) items.forEach { snapshot.appendItems([$0], toSection: ItemSectionMapper.getSection(for: $0)) } self

diffable data source section header blinks during update

社会主义新天地 提交于 2021-01-05 13:18:47
问题 I'm currently facing the issue, that when applying a new snapshot to my current data source, that the header, footer and decoration views are not part of the collection view's subviews, which can be noticed as a weird flicker. Did anyone face that issue before? I update the data source via: var snapshot = NSDiffableDataSourceSnapshot<Section, Item>() snapshot.appendSections(Sections.allCases) items.forEach { snapshot.appendItems([$0], toSection: ItemSectionMapper.getSection(for: $0)) } self

ML Build error for Catalyst (Xcode 12 GM)

烂漫一生 提交于 2021-01-02 06:08:15
问题 Anyone else having issues with the GM release with ML models and has a solution for this? I get the following error: Type 'MLModel' has no member '__loadContents' I have cleaned the Project + deleted derived data (this is a generated file that is put into the derived data folder) I notice that the method should not be there for mac OS 10.15 which I use, but it there for some reason. I also noticed that this API is still in beta while the GM is a production build? https://developer.apple.com

ML Build error for Catalyst (Xcode 12 GM)

岁酱吖の 提交于 2021-01-02 06:07:21
问题 Anyone else having issues with the GM release with ML models and has a solution for this? I get the following error: Type 'MLModel' has no member '__loadContents' I have cleaned the Project + deleted derived data (this is a generated file that is put into the derived data folder) I notice that the method should not be there for mac OS 10.15 which I use, but it there for some reason. I also noticed that this API is still in beta while the GM is a production build? https://developer.apple.com

Can I add WidgetKit extensions to an app with target iOS < 14?

前提是你 提交于 2021-01-02 05:48:30
问题 I want to add a (WidgetKit-)widget to my iOS app. The app itself should keep a target of < 14. Obviously, the widget would be available only on those devices >= 14, but the app should run on all other devices as well. Is this possible? 回答1: Yes, you can as I develop the Widgets on an iOS13 Xcode project. You can see them on an iPhone that runs iOS14 and not on the iOS13 one. You just need to add @available(iOS14) in your code because you are using WidgetKit. But don't worry, Xcode will remind

Can I add WidgetKit extensions to an app with target iOS < 14?

邮差的信 提交于 2021-01-02 05:46:16
问题 I want to add a (WidgetKit-)widget to my iOS app. The app itself should keep a target of < 14. Obviously, the widget would be available only on those devices >= 14, but the app should run on all other devices as well. Is this possible? 回答1: Yes, you can as I develop the Widgets on an iOS13 Xcode project. You can see them on an iPhone that runs iOS14 and not on the iOS13 one. You just need to add @available(iOS14) in your code because you are using WidgetKit. But don't worry, Xcode will remind

Checking user location permission status on iOS 14

耗尽温柔 提交于 2021-01-01 04:53:20
问题 So I wanted to check if I have access to the user location on iOS14 or not & I found this code but XCode(12) yells at me with this: 'authorizationStatus()' was deprecated in iOS 14.0 And here is the code: func hasLocationPermission() -> Bool { var hasPermission = false if CLLocationManager.locationServicesEnabled() { switch CLLocationManager.authorizationStatus() { // <= 'authorizationStatus()' was deprecated in iOS 14.0 case .notDetermined, .restricted, .denied: hasPermission = false case

SwiftUI Map Display Annotations

随声附和 提交于 2020-12-31 05:24:42
问题 I decided to switch from wrapping MKMapView into a UIViewRepresentable to the new Map() in SwiftUI. I was able to display correctly a MKMapRect into the Map() but I am unable to display two MKPointAnnotation there. Also my route between these annotation is not showing It is requiring me to provide an RandomAccessCollection and a (Identifiable) -> MapAnnotationProtocol> but I do not know what to put there. Any idea what should I put in (Identifiable) -> MapAnnotationProtocol ? import SwiftUI

SwiftUI Map Display Annotations

梦想的初衷 提交于 2020-12-31 05:24:41
问题 I decided to switch from wrapping MKMapView into a UIViewRepresentable to the new Map() in SwiftUI. I was able to display correctly a MKMapRect into the Map() but I am unable to display two MKPointAnnotation there. Also my route between these annotation is not showing It is requiring me to provide an RandomAccessCollection and a (Identifiable) -> MapAnnotationProtocol> but I do not know what to put there. Any idea what should I put in (Identifiable) -> MapAnnotationProtocol ? import SwiftUI

UITextField backgroundColor set in Interface Builder is nil at runtime in iOS 14

為{幸葍}努か 提交于 2020-12-30 06:15:02
问题 I have an app that works properly on iOS 11-13, but when I run it in iOS 14 several text fields within it are rendered with a nil, and so transparent, background color even though the background color is set to White explicitly in the Interface Builder. I can't see anywhere in the code that uses those text fields that might mess up the background color, and these same UITextFields running under the same scenarios appear with White background on iOS 13 and below. If I set the color explicitly