ios13

Reading files from external storage in iOS 13

a 夏天 提交于 2020-03-19 05:01:07
问题 I have an iOS app that is trying to read files from an external storage device without importing them into the App's sandbox. I have followed Apple's documentations outlined here to do this -- Providing Access to Directories I'm able to retrieve the selected directory ( which is on an external storage device connected via the Lightning port ) and enumerate the files inside the directory. However, when I try to do something with those files as per the recommended pattern, I get a failure and

Swiftui List Row Cells set padding after View appears

泪湿孤枕 提交于 2020-03-17 11:01:05
问题 I have a standard List only with one Text and on the right side the arrow for navigation. But after the list is loading and appeared at Screen, the list addapt the cells I think they add padding at the left and at the right. But this is not looking good, so it is looking like the list lags! List { ForEach(0..<book.chapters) { index in NavigationLink(destination: ReadingView(book: self.book, chapter: index)){ Text("Kapitel \(index + 1)") } } } .navigationBarTitle(Text(book.long_name),

Is there a way that I can limit the text to 2 / 3 lines using SwiftUI?

我只是一个虾纸丫 提交于 2020-03-05 06:35:11
问题 I am trying using var body: some View { Text("This is large text. Is there a way that I can unwrap the large text as discussed").lineLimit(2) } FYI: I knew var body: some View { Text("This is large text. Is there a way that I can unwrap the large text as discussed").lineLimit(nil) } It will wrap the text to say n number of lines. 回答1: Call .lineLimit(3) on the Text element. (Technically, it can be called on any View , in which case it will limit the lines of all Text elements in that view.)

iOS13.1 UIAlertController with preferedStyle: .actionSheet cannot change title's text color and font

元气小坏坏 提交于 2020-03-05 04:25:26
问题 I change title font and color like this: let titleAttributes = [NSAttributedStringKey.font: UIFont(name: "HelveticaNeue-Bold", size: 25)!, NSAttributedStringKey.foregroundColor: UIColor.purple] alert.setValue(titleString, forKey: "attributedTitle") Before iOS13 this worked fine both for preferredStyle .alert and .actionSheet. Now it only works for .alert and doesn't work for .actionSheet. Someone please any help? 回答1: iOS 13 now embeds the UIAlertController title in a UIVisualEffectView, and

SwiftUI How to add done button to picker

我们两清 提交于 2020-03-03 21:46:32
问题 Ive make a mini app with just a button and a picker and the idea is to have a done button above the picker so once ive chosen a value i can press done and the picker will close. I am aware if you click the "click me" button it will open and if you click it again close the picker but im looking for a button that appears with the picker and disapears with the clicker when clicked. Almost like a toolbar above the picker with a done button @State var expand = false @State var list = ["value1",

iOS 13 Incoming Call UI goes to Recents

梦想与她 提交于 2020-02-28 08:02:52
问题 I'm developing VoIP based audio call in my application. I have a strange issue for which I couldn't find a solution. For iOS 13+ devices, sometimes incoming CallKit UI goes in Background. That means incoming CallKit UI doesn't show upfront, but I'm able to hear the call ringtone audio and vibration. When I double-tap on the Home button, I'm able to see my app with the IncomingCall UI in Recents. When I tap on it, it shows the CallKit UI and then I'm not able to move to other applications via

How to compare two UIDynamicProviderColor?

我的梦境 提交于 2020-02-28 06:11:16
问题 I'm comparing two UIColor initialised using the new iOS 13 init(dynamicProvider:) https://developer.apple.com/documentation/uikit/uicolor/3238041-init but that's what I get runtime when I compare them in unit test with an XCTAssertEqual : XCTAssertEqual failed: ("Optional(<UIDynamicProviderColor: {...}; provider = <__NSMallocBlock__: {...}>>)") is not equal to ("Optional(<UIDynamicProviderColor: {...}; provider = <__NSMallocBlock__: {...}>>)") This is an example of how I create the color:

How to compare two UIDynamicProviderColor?

大兔子大兔子 提交于 2020-02-28 06:10:32
问题 I'm comparing two UIColor initialised using the new iOS 13 init(dynamicProvider:) https://developer.apple.com/documentation/uikit/uicolor/3238041-init but that's what I get runtime when I compare them in unit test with an XCTAssertEqual : XCTAssertEqual failed: ("Optional(<UIDynamicProviderColor: {...}; provider = <__NSMallocBlock__: {...}>>)") is not equal to ("Optional(<UIDynamicProviderColor: {...}; provider = <__NSMallocBlock__: {...}>>)") This is an example of how I create the color:

Cannot get name & email with sign in with Apple on real device

百般思念 提交于 2020-02-27 08:15:25
问题 So I'm implementing sign in with Apple, everything goes well on the simulator, I request email, fullName scopes, the authenticate UI shows, and I can get the data, as images shown below: But when testing on real device (iPadOS 13, iPad 2018), the UI didn't show (it does not asks for name and email on the UI), and I can't get the email, fullName from the response, and I can also confirm that the authorizedScopes are empty, I can only get the user identifier I believe this is a bug and will

Cannot get name & email with sign in with Apple on real device

三世轮回 提交于 2020-02-27 08:14:14
问题 So I'm implementing sign in with Apple, everything goes well on the simulator, I request email, fullName scopes, the authenticate UI shows, and I can get the data, as images shown below: But when testing on real device (iPadOS 13, iPad 2018), the UI didn't show (it does not asks for name and email on the UI), and I can't get the email, fullName from the response, and I can also confirm that the authorizedScopes are empty, I can only get the user identifier I believe this is a bug and will