ios13

Swift - Inserting image onto PDF no longer working on iOS 13

拈花ヽ惹草 提交于 2019-12-07 05:33:10
问题 Currently working on a feature to export a PDF on my loan calculator app. I have a preview screen that'll show the PDF before you save it. The preview screen composes of a webView with html that contain placeholders. I was able to successfully insert an image onto the correct placeholder and have it display onto the PDF. But with iOS 13, the image no longer shows or it displays too small. LineGraph.html <div class ="line-graph"> <center class = "graph-header">Amortization Line Chart</center>

NSCocoaErrorDomain Code=257 file couldn’t be opened because you don’t have permission to view it : FileManager attributesOfItem returns nil in iOS13

左心房为你撑大大i 提交于 2019-12-07 03:02:20
问题 FileManager returns permission error while trying to get the file size, in iOS 13 devices. do { let attr = try FileManager.default.attributesOfItem(atPath: my_file_path) //--> Getting nil fileSize = attr[FileAttributeKey.size] as! UInt64 } catch { print("Error: \(error)") } Error returned: Error Domain=NSCocoaErrorDomain Code=257 "The file “trim.1A9FFC19-EE2C-438A-BF3D-97E05A97EF9E.MOV” couldn’t be opened because you don’t have permission to view it." UserInfo={NSFilePath=/private/var/mobile

Has IOS13 broken <audio> tags used as audio buffers connected to the audio context?

落爺英雄遲暮 提交于 2019-12-07 00:16:39
问题 We are currently developing a website that allows users to play simple audio tags connected to the audiocontext. We are aware of technical issues with IOS such as playback initiated by user gestures. Everything is working fine up to IOS12. Now that IOS13 is out, nothing works anymore. It works on all desktops, android and IOS up to IOS13. Any idea on what is going on? There are no error messages in the console when debugging with Safari on Desktop connected to the iphone. https://codepen.io

`scene(_ scene: UIScene, continue userActivity: NSUserActivity)` doesn't get called when the app is launched after the user clicks on a universal link

风格不统一 提交于 2019-12-06 21:50:34
Method scene(_ scene: UIScene, continue userActivity: NSUserActivity) doesn't get called when the app is launched after the user clicks on a universal link. It works fine when already launched app opens again after the user clicks on the universal link. The sample code: func scene(_ scene: UIScene, continue userActivity: NSUserActivity) { guard userActivity.activityType == NSUserActivityTypeBrowsingWeb, let incomingURL = userActivity.webpageURL, let components = NSURLComponents(url: incomingURL, resolvingAgainstBaseURL: true), let path = components.path else { return } let params = components

Mapkit is using too much CPU in IOS 13

折月煮酒 提交于 2019-12-06 15:24:34
Recently my iOS app starting crashing frequently after some users updated to iOS 13.x (it doesn't exhibit the problem in iOS 12.x) I am using Mapkit to render some MKPolygons and MKPolylines. The MKPolylines get removed and re-added to the MKMapView around 10 times per second (that's because my GPS is giving me new lat/longs at 10Hz). I profiled my app in iOS 12.x and it is using around 15% to 30% of CPU resources (iPad Mini 4). I did the same profiling in iOS 13.1.2 and 13.1.3, and the CPU consumption went up to around 150% (there are 2 CPU cores). If I remove the code that renders the 2

iOS 13: NavigationBar BarStyle is ignored when using UINavigationBarAppearance

徘徊边缘 提交于 2019-12-06 12:34:16
I have a custom colour Navigation Bar and I need to make sure the Status Bar colour is set to white. In pre iOS 13 this was easy to do, here is a code snippet from a UIViewController that did the job just fine: override func viewDidLoad() { super.viewDidLoad() self.navigationController?.navigationBar.barStyle = .black } The issue I'm facing with iOS 13 is that I now need to use the NavigationBar's standardAppearance and scrollEdgeAppearance to undo the forced background transparency in the new UIKit. While I'm able to get the text and background colour of the NavigationBar to what I need with

Siri shortcuts iOS 13 bug INUIAddVoiceShortcutButton

空扰寡人 提交于 2019-12-06 11:04:08
In my project I use siri shortcuts with INUIAddVoiceShortcutButton . I use this method to create the button and associate the NSUserActivity : let button = INUIAddVoiceShortcutButton(style: .blackOutline) view.addSubview(button) button.shortcut = INShortcut.userActivity(activityPreCreated) In iOS 12 all works right, the button add or edit the shortcuts. But in iOS 13 the button only add but doesn't edit the shortcut and remain with the text "Add to Siri". Is a bug of the beta or I do something wrong? Thanks in advance. 来源: https://stackoverflow.com/questions/57410172/siri-shortcuts-ios-13-bug

Customise UITabBar height in Xcode11 / iOS13 or 13.1

旧时模样 提交于 2019-12-06 08:15:29
问题 I used to use the following code to adjust the height of my tab bar. However after I upgrade to Xcode 11 and using swift 5, the UI doesn't appear correctly anymore. class MyTabBarController: UITabBarController { private lazy var defaultTabBarHeight = { [unowned self] in return self.tabBar.frame.size.height }() let higherTabBarInset: CGFloat = 24 override func viewWillLayoutSubviews() { super.viewWillLayoutSubviews() let newTabBarHeight = defaultTabBarHeight + higherTabBarInset var newFrame =

How we Support Dark Mode in Current iOS App with iOS 13?

喜欢而已 提交于 2019-12-06 06:34:54
问题 My current app is developed in objC and Swift both. i need to support a darkmode. can anyone suggest how can i achieve this by globally? 回答1: Here is the code for adding your color logic should appear in the dark mode. if self.traitCollection.userInterfaceStyle == .dark { //Add your Dark mode colors here } else { //Your normal colors should appear here } To know more about adapting dark mode in your iOS application please refer to the following blog post. How to Adopt iOS 13 Dark Mode in your

Chaining animations in SwiftUI

天涯浪子 提交于 2019-12-06 05:59:14
问题 I'm working on a relatively complex animation in SwiftUI and am wondering what's the best / most elegant way to chain the various animation phases. Let's say I have a view that first needs to scale, then wait a few seconds and then fade (and then wait a couple of seconds and start over - indefinitely). If I try to use several withAnimation() blocks on the same view/stack, they end up interfering with each other and messing up the animation. The best I could come up with so far, is call a