ios13

Padding wrong when presenting second modal navigation controller on iOS 13

自闭症网瘾萝莉.ら 提交于 2020-01-25 06:49:14
问题 On iOS 13, when presenting a second modal view controller over a first one, the padding is incorrect on the button bar items. In particular, the right margin disappears. How should this be fixed? 回答1: This behavior is due to a bug in iOS 13. It can be fixed by calling setNeedsLayout on the Navigation Bar. Swift example: override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) if #available(iOS 13.0, *) { navigationController?.navigationBar.setNeedsLayout() } } Objective

iOS 13 CATransform3D issues

為{幸葍}努か 提交于 2020-01-25 06:49:09
问题 Prior to the release of iOS 13, I had had some CATransform3D code inside a UIView.animate block. In iOS 12, the result of the transformation animation looked like this: https://youtu.be/mfIzjjlKOBM. In iOS 13, the same transformation code now gives this result: https://youtu.be/hQdyGactIfA. As you can see in iOS 13 the animation is no longer a fluid cube movement like it is in iOS 12. Here's my basic code: UIView.animate(withDuration: duration, delay: 0, options: .curveEaseOut, animations: {

On My iPhone folders, how to create a folder for my app? [iOS 13]

情到浓时终转凉″ 提交于 2020-01-25 04:10:45
问题 I am trying to create a folder for my app in the Files app for access when i want to save a file from my app In iOS 12 and earlier i could achieve this by enabling Application supports iTunes file sharing and Supports opening documents in place as shown below Since updating to iOS 13, the same folder that used to show up in iOS 12 no-longer shows. What has changed and how can i get this resolved in iOS 13? I use the extension below to save files: extension WebViewController:

PKDrawing different results for Dark Mode and Light Mode

大憨熊 提交于 2020-01-25 03:55:21
问题 When using PKDrawing in dark mode the image generated by imageFromRect:scale: returns pen drawings in white color. In light mode it uses black color. The background is usually transparent. Question: How can PKDrawing be forced to always behave like in light mode? 回答1: You can do it like this, by using traitCollection.performAsCurrent: let darkImage = thumbnail(drawing: drawing, thumbnailRect: frameForImage, traitCollection: UITraitCollection(userInterfaceStyle: .dark)) func thumbnail(drawing:

iOS 13: UITextField with LeftView spacing issue - Xcode 11

老子叫甜甜 提交于 2020-01-24 19:42:25
问题 iOS 12.0 with Xcode 10.0 iOS 13.0 with Xcode 11.0 I have taken custom LeftView with image and label for adding LeftView in UITextField. I have set all the needed constraints also but still I am facing issues of LeftView width spacing. In old Xcode and iOS it was working well but after new Xcode and iOS there is something wrong. 回答1: I had similar problem fixed by adding constraints. Make sure had set UIImageView and UILabel width constraints and margins with other views, like: H:|-0-[image(=

How to create a plain view in swiftUI

落花浮王杯 提交于 2020-01-24 12:39:04
问题 I'm trying to create a plain view with a background color in SwiftUI . But everything I can find are elements that are not plain views like Text, Button, Image, List, etc.. When I try to use View , it shows me following error messages: 'View' cannot be constructed because it has no accessible initializers 'View' Protocol can only be used as a generic constraint because it has Self or associatedType requirements How do I create a rectangular view with background color? 回答1: Just use the

UIMenuController is not visible in iOS 13.2

↘锁芯ラ 提交于 2020-01-24 12:19:08
问题 I have long press handler that shows UIMenuController , it works as usual on < ios13.2, for example on 13.1 it works fine, but on ios13.2 it's not shown, here's methods that I had: private func longPressHandler(sender: UILongPressGestureRecognizer) { guard sender.state == .began, let senderView = sender.view, let superView = sender.view?.superview else { return } senderView.becomeFirstResponder() UIMenuController.shared.setTargetRect(senderView.frame, in: superView) UIMenuController.shared

Does FCM support the new apns-push-type for iOS 13

孤街浪徒 提交于 2020-01-24 12:09:10
问题 We currently have a solution to send the push notification from FCM to APNS and then to iOS. Due to the introduction of iOS13, the APNS now requires apns-push-type in any incoming payload that specifies whether it's an alert notification, background notification, or any other type. I am wondering how to add this information in the message sent to the FCM. Currently we use pyFCM to send messages to FCM. And we follow this page as reference: https://firebase.google.com/docs/cloud-messaging/http

Does FCM support the new apns-push-type for iOS 13

筅森魡賤 提交于 2020-01-24 12:09:04
问题 We currently have a solution to send the push notification from FCM to APNS and then to iOS. Due to the introduction of iOS13, the APNS now requires apns-push-type in any incoming payload that specifies whether it's an alert notification, background notification, or any other type. I am wondering how to add this information in the message sent to the FCM. Currently we use pyFCM to send messages to FCM. And we follow this page as reference: https://firebase.google.com/docs/cloud-messaging/http

iOS 13 check for provisional authorization status of CLLocationManager

ぐ巨炮叔叔 提交于 2020-01-24 11:34:42
问题 As per the WWDC video, https://developer.apple.com/videos/play/wwdc2019/705/, when you ask for " AlwaysAuthorization " permission you will see only " When In Use, Once and Don't allow" . Even if you tap on " When In Use ", the delegate call back will come back as kCLAuthorizationStatusAuthorizedAlways . This is working as expected. But is there a way to find out that the request is still provisional or actually-always-allow? There is no enum associated to this permission. The only allowed