3dtouch

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

心不动则不痛 提交于 2019-12-09 00:55:10
问题 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

3D Touch Peek with Top Bar

被刻印的时光 ゝ 提交于 2019-12-08 18:35:28
I have a UICollectionView that shows 'Peek' when 3D Touch 'ed. As default behavior, 'Peek' ignores navigation bars. However, I do want to show a bar just as in iMessage Peek shown below: Both Collection View Controller & Peek View Controller are inside Navigation View Controller. I have following snippet from Apple's Sample code below that I am trying to modify in to above needs: extension ChatTableViewController: UIViewControllerPreviewingDelegate { func previewingContext(_ previewingContext: UIViewControllerPreviewing, viewControllerForLocation location: CGPoint) -> UIViewController? { guard

3D Touch Peek with Top Bar

和自甴很熟 提交于 2019-12-08 03:50:01
问题 I have a UICollectionView that shows 'Peek' when 3D Touch 'ed. As default behavior, 'Peek' ignores navigation bars. However, I do want to show a bar just as in iMessage Peek shown below: Both Collection View Controller & Peek View Controller are inside Navigation View Controller. I have following snippet from Apple's Sample code below that I am trying to modify in to above needs: extension ChatTableViewController: UIViewControllerPreviewingDelegate { func previewingContext(_ previewingContext

In iOS, how can I distinguish a Haptic Touch from a long press?

China☆狼群 提交于 2019-12-07 10:36:34
问题 Apple's recent iPhone XR announcement replaces 3D Touch with Haptic Touch, letting you access 3D Touch features by just long-pressing a view. I'm curious how that will interact with existing UILongPressGestureRecognizer interfaces. There are items in my app that currently have different 3D Touch and long-press functionality. Since the iPhone XR hardware isn't yet available, I was wondering if anything had been published about how the two features will work together. 回答1: Based on testing in

Can you use 3D Touch on widgets?

≡放荡痞女 提交于 2019-12-06 04:11:34
I am thinking about creating an iOS app that will have a notifications center extension. However I need my app to use 3D Touch on the extension within the Notification Center, is it possible? To my knowledge, you cannot. From apple documentation, it appears the feature is only available in app and on the homescreen: A user can now press your Home screen icon to immediately access functionality provided by your app. Within your app, a user can now press views to see previews of additional content and gain accelerated access to features. For experimentation sake, try enrolling the view

Refresh 3D Touch Quick Action title

自作多情 提交于 2019-12-05 13:16:55
I want to show the date in a 3D Touch Quick Action item. Is there any way for the data to refresh if the user has not opened the app? Right now, the quick action will only show the date of the last time the app was opened, rather than the current date. Is it possible to show current info or is that some background process that is not allowed? AppDelegate : func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { let dateVariable = Date() let dateFormatter = DateFormatter() dateFormatter.dateStyle = .short let

Swift 3D Touch iOS 10 Home screen quick actions share Item missing

半城伤御伤魂 提交于 2019-12-05 12:49:02
问题 In my apps that use 3D touch home screen quick actions I do not have the new iOS 10 default sharing option that all apps got for free. I have seen some apps, for example Amazon, that have their 4 custom shortcut items (quick actions) and the 1 default sharing option. Is there a way I can get the default iOS 10 sharing option back? 回答1: That feature or option is only available for apps that are live on the App Store, it will not show up when testing your app. It is done automatically so there

UIApplicationShortcutItem - Can I use an image downloaded from the web as UIApplicationShortcutIcon?

大城市里の小女人 提交于 2019-12-04 21:43:41
问题 I'm setting up some 3D Touch functionality and would like to use an image that has been downloaded from the web (can access via SDWebImage 's cache) as an audio cover image in a UIApplicationShortcutItem , just like Apple's music app (see screenshot). Is this possible? It looks like it isn't as I can't put the image in to the app's bundle as far as I know? I guess Apple is doing something that devs can't do yet? UIApplicationShortcutItem 's docs only have the following: // Create an icon

Swift 3D Touch iOS 10 Home screen quick actions share Item missing

心不动则不痛 提交于 2019-12-03 22:27:17
In my apps that use 3D touch home screen quick actions I do not have the new iOS 10 default sharing option that all apps got for free. I have seen some apps, for example Amazon, that have their 4 custom shortcut items (quick actions) and the 1 default sharing option. Is there a way I can get the default iOS 10 sharing option back? MwcsMac That feature or option is only available for apps that are live on the App Store, it will not show up when testing your app. It is done automatically so there is nothing you will have to do. 来源: https://stackoverflow.com/questions/39752216/swift-3d-touch-ios

UIApplicationShortcutItem - Can I use an image downloaded from the web as UIApplicationShortcutIcon?

ぐ巨炮叔叔 提交于 2019-12-03 13:48:01
I'm setting up some 3D Touch functionality and would like to use an image that has been downloaded from the web (can access via SDWebImage 's cache) as an audio cover image in a UIApplicationShortcutItem , just like Apple's music app (see screenshot). Is this possible? It looks like it isn't as I can't put the image in to the app's bundle as far as I know? I guess Apple is doing something that devs can't do yet? UIApplicationShortcutItem 's docs only have the following: // Create an icon using a system-defined image. + (instancetype)iconWithType:(UIApplicationShortcutIconType)type; // Create