ios11

Document Creation with UIDocumentBrowserViewController

百般思念 提交于 2019-12-10 13:41:45
问题 The documentation for documentBrowser(_:didRequestDocumentCreationWithHandler:) says, "Create a new document and save it to a temporary location. If you use a UIDocument subclass to create the document, you must close it before calling the importHandler block." So I created a file URL by taking the URL for the user's temporary directory ( FileManager.default.temporaryDirectory ) and appending a name and extension (getting a path like "file:///private/var/mobile/Containers/Data/Application

How to handle iOS 11 Navigation BarButtonItems bug?

混江龙づ霸主 提交于 2019-12-10 12:58:14
问题 I found a UINavigationBar bug in iOS 11.Fisrtly setup navigation item button in viewDidLoad with self.navigationItem.rightBarButtonItems = @[fixSpaceItem, item] . And use gesture pop back, but I don't really pop back, when pop back starts, I release my finger and let the viewcontroller cancel pop back, then right navigation button items disappear. The left item buttons have the same problem. To reproduce this bug, you must add fixSpaceItem like [[UIBarButtonItem alloc]

Location Access Request in iOS 11

北城以北 提交于 2019-12-10 12:50:05
问题 I am requesting the user location in my app. locationManager.requestAlwaysAuthorization() This line of code should return this alert message: However, I want the user to choose between "Don't Allow" and "Always Allow" only. how can I delete the "Only While Using The App" option? Knowing that this is what I included in the info.plist, and deleting any row from these 3 rows in the info.plist is causing the app not to show this alert at all. 回答1: It is not optional anymore. Since iOS 11 has been

ios 11 issue in MFMailComposeViewController's navigation bar

回眸只為那壹抹淺笑 提交于 2019-12-10 11:34:49
问题 I used below code to present a MFMailViewController. Everything worked perfectly until ios 11 release. let mailViewController = MFMailComposeViewController() mailViewController.mailComposeDelegate = self mailViewController.setToRecipients(nil) mailViewController.setSubject("Subject") mailViewController.navigationBar.tintColor = UIColor.green UINavigationBar.appearance().isTranslucent = false self.present(mailViewController, animated: true, completion: nil) No matter what code I use, nothing

iOS 11 and XCode 9.3 - HTTP load failed

依然范特西╮ 提交于 2019-12-10 11:32:23
问题 iOS11 devices are occasionally issue this error: "HTTP load failed (error code: -1005 [1:54])." The app is connecting to https json web service and while its in the foreground everything runs smoothly (timer is doing the web service calls), but from time to time (cannot replicate the issue all the time) this error occurs when the app is moving from background to foreground. Whenever app is moving to background I invalidate the timer performing the calls, and whenever app is brought to

ARKIT : place object on a plane doesn't work properly

这一生的挚爱 提交于 2019-12-10 11:07:52
问题 I am learning ARKit and trying to place an object on a detected plane. But it doesn't work properly and there's a space between the plane and the 3D object. here's my code for the plane detection : func renderer(_ renderer: SCNSceneRenderer, didAdd node: SCNNode, for anchor: ARAnchor) { position = SCNVector3Make(anchor.transform.columns.3.x, anchor.transform.columns.3.y, anchor.transform.columns.3.z) guard let planeAnchor = anchor as? ARPlaneAnchor else { return } let plane = SCNPlane(width:

Restoring first responder after dismissing popoverview

混江龙づ霸主 提交于 2019-12-10 10:58:16
问题 I have a text view on the main view controller. I have a bar button item on the view controller's navigation bar. When the app starts, I perform the following actions: Tap the text view to begin editing and to show the keyboard. Tap the bar button to show a popover view. Without dismissing the popover view, I dismiss the keyboard. Dismiss the popover view by tapping any other view on the screen. Before iOS 11, the keyboard will NOT show up again after Step 4. However, in iOS 11, it will show

ARKit - place a SCNPlane between 2 vector points on a plane in Swift 3 [duplicate]

﹥>﹥吖頭↗ 提交于 2019-12-10 10:14:17
问题 This question already has an answer here : Scenekit shape between 4 points (1 answer) Closed last year . Similar to some of the measuring apps you can see being demonstrated in ARKit, I have a plane with 2 marker nodes on it and a line drawn between the 2. What I need though is an SCNPlane between the 2. So, if your original was the floor and you put a marker either side of a wall, you could represent the physical wall with a SCNPlane in your AR world. Currently I'm placing the line with the

Core Image filter CISourceOverCompositing not appearing as expected with alpha overlay

依然范特西╮ 提交于 2019-12-10 04:19:32
问题 I’m using CISourceOverCompositing to overlay text on top of an image and I’m getting unexpected results when the text image is not fully opaque. Dark colors are not dark enough and light colors are too light in the output image. I recreated the issue in a simple Xcode project. It creates an image with orange, white, black text drawn with 0.3 alpha, and that looks correct. I even threw that image into Sketch placing it on top of the background image and it looks great. The image at the bottom

Password AutoFill for iOS App

浪子不回头ぞ 提交于 2019-12-10 03:14:25
问题 In iOS 11 they have introduced password autofill which fills the username and password in iOS app like the same way it does in Safari, User goes to website first, logged in save the username and password in keychain and then open app were the fields are automatically populated, the username and password can it be implemented in other ways, like I logged in the app first and then while going on the website through Safari it automatically fills the username and password? Is there any