ios13

ios13 UIPopoverViewController showing UITableViewController - Safe Area problems / Missing parts of table

a 夏天 提交于 2019-12-01 11:31:39
In the same theme as this post: iOS 13 - UIPopoverPresentationController sourceview content visible in the arrow I have a UITableViewController instantiated from the Storyboard. I'm presenting it in a UIPopoverViewController. Depending on orientation I either have a side missing or the top missing and the content of the _UITableViewHeaderFooterViewBackground scrolls 'through' the arrow. What's wrong: These are when it's on the top, but if it presents on the side then the whole side EDIT: I AM using the Safe Area Guides: As I said previously, I dragged on from the object library a brand new

Keyboard overlaying action sheet in iOS 13.1 on CNContactViewController

不问归期 提交于 2019-12-01 08:16:40
This seems to be specific to iOS 13.1, as it works as expected on iOS 13.0 and earlier versions to add a contact in CNContactViewController, if I 'Cancel', the action sheet is overlapping by keyboard. No actions getting performed and keyboard is not dismissing. Kudos to @GxocT for the the great workaround! Helped my users immensely. But I wanted to share my code based on @GxocT solution hoping it will help others in this scenario. I needed my CNContactViewControllerDelegate contactViewController(_:didCompleteWith:) to be called on cancel (as well as done). Also my code was not in a

How can I change Status Bar Alpha in iOS 13?

若如初见. 提交于 2019-12-01 08:02:14
I want to change the Status Bar Alpha in iOS 13. let statusBarWindow = UIApplication.shared.value(forKey: "statusBarWindow") as? UIWindow statusBarWindow?.alpha = 0.5 When I try this, the app crashes (Thread 1: signal SIGABRT). Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'App called -statusBar or -statusBarWindow on UIApplication: this code must be changed as there's no longer a status bar or status bar window. Use the statusBarManager object on the window scene instead.' You can refer to the following answer to resolve your crash. var statusBarUIView:

Set rootViewController iOS 13

好久不见. 提交于 2019-12-01 06:44:54
问题 After upgrading Xcode a critical part of my application has stopped working. When my app launches I run a function to check boolean flags and set the correct rootViewController. But the code I have been using to set this has now stopped working class func setLoginAsInitialViewContoller(window:UIWindow) { print("SET LOGIN") let storyboard = UIStoryboard(name: "Login", bundle: nil) let controller = storyboard.instantiateViewController(withIdentifier: "LoginViewController") controller

iOS 13 Text To Speech (TTS - AVSpeechSynthesisVoice) crashes for some users after update

你。 提交于 2019-12-01 06:34:54
问题 We are seeing a weird crashes for a small percentage of users related to a problem of TTS after updating to iOS 13. Anybody any idea why this happens? Anybody seeing the same crashes? let voices = AVSpeechSynthesisVoice.speechVoices() for voice in voices { if voice.name == storedName { synthVoice = voice break } } ... let utterance = AVSpeechUtterance(string: text) utterance.voice = self.synthVoice self.synthesizer.speak(utterance) Crashlog: Error: Fatal Exception: std::logic_error: Unable to

Swift/iOS13 - Access SceneDelegate window variable in a ViewController

不打扰是莪最后的温柔 提交于 2019-12-01 06:34:35
问题 Is it possible to access window variable from SceneDelegate in a ViewController? Basically I need an alternative for this UIApplication.shared.delegate.window but can't find anything 回答1: Updated From iOS 13 , apps can have multiple active windows, so you need to access the window you want. So you can access a window of any View like this: self.view.window if you really want to access the UISceneDelegate you can access it like: self.view.window.windowScene.delegate Old: and NOT recommended:

How to control when to present the Bluetooth permission request prompt in iOS13?

允我心安 提交于 2019-12-01 05:36:10
问题 With the new policies related to privacy & Bluetooth in iOS13, my app launches an alert prompt on app install, or after app update (in iOS13) requesting access to Bluetooth. Is there anyway to control the presentation of this prompt? I'm making sure that the app doesn't access or initializes anything related to the CBCentralManager, on app start, but in a very specific place in the app, but still I get the prompt on app start. Is the presentation of this prompt related to the CBCentralManager

Preview document using UIDocumentInteractionController doesn't work in iOS 13

泄露秘密 提交于 2019-12-01 05:20:30
问题 I use the UIDocumentInteractionController to preview files of different types within the app. This has worked fine in the past, but when running the app on a device with iOS 13 the document is not presented. What is shown is the file name and type. I have looked for similar questions and found this UIDocumentInteractionController showing file name and file type , not file contents I've tried NSUrl.CreateFileUrl(FilePath, null) as the comments on that question suggest but this doesn't solve

Does iOS 13 has new way of getting device notification token?

落爺英雄遲暮 提交于 2019-12-01 04:34:46
So my friend got this email from OneSignal Due to a change that may occur as part of the upcoming iOS 13 release, you must update to the latest version of the iOS SDK before building your app with Xcode 11. All of OneSignal’s wrapper SDKs including React Native, Unity, and Flutter have been updated as well. The reason for this is that Xcode 11, which is being released alongside iOS 13, breaks a common technique that apps and libraries like OneSignal were using to get a push token for the device. If you do not use our new SDK then new users will not be able to subscribe to notifications from

Every UIAlertController disappear automatically before user responds - since iOS 13

北战南征 提交于 2019-12-01 01:14:47
问题 Since I'm using iOS 13, each of my UIAlertController shows up for about half a second and disappears instantly before any user action. Any idea ? As I use UIAlertController from different parts of my app, I use an extension that allows me to pop up both from classical views and collectionView (cell, header etc...) public extension UIAlertController { func show() { let win = UIWindow(frame: UIScreen.main.bounds) let vc = UIViewController() vc.view.backgroundColor = .clear vc.view.tintColor =