ios10

`touchesBegan:withEvent:` is delayed at left edge of screen

五迷三道 提交于 2019-11-30 22:47:11
I'm experiencing an issue where the first call to touchesBegan:withEvent: on a UIView or UIViewController is delayed when you touch on the left edge of the screen. This seems to be a new issue with iOS 10, and only happens on devices with 3D Touch (iPhone 6s and newer). In fact, if you disable 3D Touch in General->Accessibility, the issue goes away. However, the issue doesn't seem to happen when you use UIGestureRecognizers . My workaround at the moment is to create a UIGestureRecognizer subclass that overrides the touches* methods and forwards them to my old implementation. Is this just a bug

How to check if Apple Maps is installed

北城以北 提交于 2019-11-30 22:11:04
问题 Anyone aware how to check whether Apple Maps is installed or not? I could not find anything in the docs. With iOS10 users can delete the Apple Maps application. While for Google Maps we can use UIApplication.shared.canOpenURL() to check if it's installed. I am not aware of such a thing exists to check for Apple Maps. Of course one can check if opening a MKMapItem with mapItem.openInMaps() fails - but that does not help for checking in advance. 回答1: The simple answer is this is not currently

Programmatically create SKTileMapNode in Swift

人走茶凉 提交于 2019-11-30 21:58:32
does anyone know how to create an SKTileMapNode programmatically using Swift please? (NOTE: I do not want to do this using the editor, I want to achieve this programmatically only) I have tried the following but does not render my tile map let bgTexture = SKTexture(imageNamed: "background") let bgDefinition = SKTileDefinition(texture: bgTexture, size: bgTexture.size()) let bgGroup = SKTileGroup(tileDefinition: bgDefinition) let tileSet = SKTileSet(tileGroups: [bgGroup]) let bgNode = SKTileMapNode(tileSet: tileSet, columns: 5, rows: 5, tileSize: bgTexture.size()) bgNode.position = CGPoint(x:

NSPersistentContainer is only available in 10.0 or newer : error

与世无争的帅哥 提交于 2019-11-30 21:39:53
It's because My deployment target is less than 10. how to resolve for deployment target lower to 10.0 ? One of solutions is to use https://github.com/inspace-io/INSPersistentContainer and add typealias NSPersistentContainer = INSPersistentContainer typealias NSPersistentStoreDescription = INSPersistentStoreDescription to your file where you want to use Not available means not available. There are two options: Use only the old NSPersistentStoreCoordinator / NSManagedObjectModel pattern. Use both patterns and write the code with availability checking if #available(iOS 10, *) Alex Cio Before iOS

ISO8601DateFormatter doesn't parse ISO date string

Deadly 提交于 2019-11-30 21:37:39
问题 I'm trying to parse this 2017-01-23T10:12:31.484Z using native ISO8601DateFormatter class provided by iOS 10 but always fails. If the string not contains milliseconds, the Date object is created without problems. I'm tried this and many options combination but always fails... let formatter = ISO8601DateFormatter() formatter.timeZone = TimeZone(secondsFromGMT: 0) formatter.formatOptions = [.withInternetDateTime, .withDashSeparatorInDate, .withColonSeparatorInTime, .withColonSeparatorInTimeZone

Error: __tcp_connection_write_eof_block_invoke Write close callback received error - iOS 10

旧街凉风 提交于 2019-11-30 21:35:01
While sending XML base API Request to ONVIF Camera. It worked fine on ios 9 device, but giving '500 Internal Error' on iOS 10. XCode 8 Console prints below error messages: 2016-09-30 12:39:51.295419 VCPlugin[278:10183] [] nw_socket_get_input_frames recvmsg(fd 12, 1024 bytes): [54] Connection reset by peer 2016-09-30 12:39:51.301221 VCPlugin[278:10228] [] nw_socket_write_close shutdown(12, SHUT_WR): [57] Socket is not connected 2016-09-30 12:39:51.301307 VCPlugin[278:10228] [] nw_endpoint_flow_service_writes [3 10.107.2.153:80 ready socket-flow (satisfied)] Write request has 0 frame count, 0

Push Notification is not working on iOS 10

我怕爱的太早我们不能终老 提交于 2019-11-30 20:29:04
After the installing the new update of iOS 10, push notifications are not working, while the same implementation of code is working for iOS 9. Is there any new thing for iOS 10 for push notification. As, I am not able figure it out. Also, is it necessary to turn on push notification under capabilities. Ashish Shah Need some changes for iOS 10 with xCode 8 GM You need to implement UserNotification.framework and their delegate methods to get work of push notifications and in capabilities needs to enable Push Notifications. You have to import new UserNotification.framework. Please follow this

Quicklook/QLPreviewController delegate methods are not calling in iOS 10 Xcode 8

大兔子大兔子 提交于 2019-11-30 20:16:50
Currently I am testing my current version in iOS10. I am using Xcode 8 beta 6 for testing. Here Quicklook/QLPreviewController delegate methods are not calling. This code set had been worked with XCode 7 and iOS 9.3 versions. I checked this issue in Apple Developer forum. But could not find a answer. Anyone have fixed this issue? (I am using Objective-C) How to use Quicklook/QLPreviewController in XCode 8 ( iOS 10 )? //----------------- SOLUTION for iOS 10 ( previewer as a subview) ------------------- This issue is occurred when you add the the previewer as a subview. Then we are using below

iOS 11 Navigation TitleView misplaced

限于喜欢 提交于 2019-11-30 20:10:03
I have an iOS app in which I am setting a custom navigation title view. It was working fine till iOS 10, but in iOS 11 the navigation title view is misplaced. Here is the screen shot for iOS 10 - Here is the screen shot for iOS 11 - As you can see in the screen shots that when I run the code on iOS 10 the title view appears to be fine. But the same code on iOS 11 shifts the title view down by some pixels and it gets cut. This is how I am setting the title view - navigationItem.titleView = MY_CUSTOM_TITLE_VIEW I tried many things and searched for many solutions but nothing is working. Here's

UNCalendarNotificationTrigger doesn't get stored unless repeats is true

我的梦境 提交于 2019-11-30 19:16:14
问题 I've noticed that if I create an UNCalendarNotificationTrigger with a custom date it does't get added unless i put: let trigger = UNCalendarNotificationTrigger(dateMatching: components, repeats: **true**) Apple Example is: let date = DateComponents() date.hour = 8 date.minute = 30 let trigger = UNCalendarNotificationTrigger(dateMatching: date, repeats: true) which make sense to be repeats == true. In my scenario I dont need to create one notification that gets repeated many times, but I need