ios13

SwiftUI withAnimation completion callback

回眸只為那壹抹淺笑 提交于 2020-08-24 05:50:47
问题 I have a swiftUI animation based on some state: withAnimation(.linear(duration: 0.1)) { self.someState = newState } Is there any callback which is triggered when the above animation completes? If there are any suggestions on how to accomplish an animation with a completion block in SwiftUI which are not withAnimation , I'm open to those as well. I would like to know when the animation completes so I can do something else, for the purpose of this example, I just want to print to console when

“Tag connection lost” error when reading a Mifare Ultralight NFC tag on iOS 13

我的梦境 提交于 2020-08-10 19:04:17
问题 I'm trying to read a page of a Mifare Ultralight tag (more specifically EnOcean PTM 215B) using NFCMifareTag.sendMifareCommand method after it has been discovered and connected onto. The problem is that all commands I've tried to send cause a "Tag connection lost" error which is quite odd as I've just successfully connected to it. The (simplified) code looks like: // tag has been determined to be of type NFCMifareTag earlier session.connect(to: tag) { (error: Error?) in if (error != nil) {

Swipe gesture interrupts UISlider control in iOS 13, but not previous iOS versions

天涯浪子 提交于 2020-08-07 06:32:59
问题 Note: This is the iOS 13 beta, but also could apply to the official release tomorrow. Update 2: I replaced it with a larger thumb image, and I'm still having a problem. Update: It looks like it still controls continuously if I'm super precise about touching the thumb on the slider. But why is this changed, and how can I make it control like before? I have a swipe gesture recognizer added to my view: let swipeRight = UISwipeGestureRecognizer(target: self, action: #selector(self

Swipe gesture interrupts UISlider control in iOS 13, but not previous iOS versions

拥有回忆 提交于 2020-08-07 06:32:47
问题 Note: This is the iOS 13 beta, but also could apply to the official release tomorrow. Update 2: I replaced it with a larger thumb image, and I'm still having a problem. Update: It looks like it still controls continuously if I'm super precise about touching the thumb on the slider. But why is this changed, and how can I make it control like before? I have a swipe gesture recognizer added to my view: let swipeRight = UISwipeGestureRecognizer(target: self, action: #selector(self

How to use @Fetchrequest outside a View

孤者浪人 提交于 2020-08-07 03:51:59
问题 I am trying to move my @fetchrequest property to an auxiliar class, which is not a View , but every time I try to do that, I get a bad instruction error. Can anyone help me? This is a sample of my code: ViewModel: class ViewModel { @FetchRequest(entity: Teste.entity(), sortDescriptors: []) var teste: FetchedResults<Teste> } View: struct ContentView: View { let viewModel: ViewModel init(viewModel: ViewModel) { self.viewModel = viewModel } var body: some View { List(viewModel.teste) { item in /

Reference error: Can't find variable: IntersectionObserver

…衆ロ難τιáo~ 提交于 2020-08-05 05:53:48
问题 I'm trying to use IntersectionObserver in cordova 8.0.0 app which is running on ios 13. When I inspect my app via safari, I see an error on intialization: ReferenceError: Can't find variable: IntersectionObserver This would suggest, that IntersectionObserver is not available, and I should use a polyfill. But! I've read many post claiming that IntersectionObserver is nativly supported in iOS safari 12+. And I kinda assume, that cordova would be running nativly available WKWebView, so it should

How to delete/reset an app from iOS 13 with XCTest?

扶醉桌前 提交于 2020-08-03 08:16:37
问题 Recently I started testing an iOS app using XCTest but I found some difficulties, the main difficulty was deleting or resetting the app content in each test class. I'm currently using XCode 11 and trying to delete/reset an app from iOS 13 for each test class, I've already tried: Delete app through springboard Delete app by going to the app settings This step is really important in my tests because in each test I need to create a profile and log in, so in the next test I need to have the app

Use SF Symbols system image for static UIApplicationShortcutItem

早过忘川 提交于 2020-08-02 06:14:26
问题 When specifying home screen quick actions, UIApplicationShortcutItems , in your Info.plist, is there a way to use a system image from SF Symbols? The docs noting the available iOS keys doesn't specify a key to do this, besides specifying one of the predefined enum cases from UIApplicationShortcutItemIconType such as UIApplicationShortcutIconTypeSearch . It is possible to use a system image when creating dynamic quick actions via a new initializer UIApplicationShortcutIcon.init(systemImageName