3dtouch

Is there a limit to how many UIApplicationShortcutItems you can have?

感情迁移 提交于 2019-12-01 16:15:06
I want to add the new 3D/Force Touch feature (UIApplicationShortcutItem) to my app but I was wondering whether there is or isn't a limit to how many you can have on a single app? I've had a look on the documentation but don't see a mention of a limit: https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIApplicationShortcutItem_class/ Vakas iOS 9 displays up to four Home screen quick actions for your app. Within this limit, the system shows your static quick actions first, starting at the topmost position in the menu. If your static items do not exhaust the limit

Is there a limit to how many UIApplicationShortcutItems you can have?

南笙酒味 提交于 2019-12-01 14:24:46
问题 I want to add the new 3D/Force Touch feature (UIApplicationShortcutItem) to my app but I was wondering whether there is or isn't a limit to how many you can have on a single app? I've had a look on the documentation but don't see a mention of a limit: https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIApplicationShortcutItem_class/ 回答1: iOS 9 displays up to four Home screen quick actions for your app. Within this limit, the system shows your static quick

`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

Silent 3D Touch Quick Action

ぐ巨炮叔叔 提交于 2019-11-30 21:57:24
As of the new 3D Touch capabilities with the new iPhone 6s/6s+, I'm trying to add some home screen quick actions to my app. I was able to implement the normal flow of force touching the app's icon in the home screen -> choose one of the quick actions available -> taking care of it properly in all possible app states. My question is: Is it possible to create a silent action among the available quick actions? By silent I mean that a certain action will take place, yet the app won't complete its launch? Or alternatively launch but won't be in foreground? UPDATE I'll elaborate on what I'm trying

Make XCUIElement perform 3D touch for Automate UITest?

拟墨画扇 提交于 2019-11-30 18:34:57
I'm creating Automate UITest test case where I'd like to test the scenario when users make 3D Touch interaction with an element, then shows them Peek and Pop view. I can't seem to find any possible ways to simulate 3D Touch on an element and continue. Anyone has any idea about this, or 3D Touch is still unavailable to test? Thanks I was able to execute a force press / 3D Touch on an app icon on an iPhone 7 running iOS 10.3. It was not possible on 10.2. Objective-C First you have to declare the following or import this header typedef void (^CDUnknownBlockType)(void); @interface XCEventGenerator

Silent 3D Touch Quick Action

折月煮酒 提交于 2019-11-30 17:34:05
问题 As of the new 3D Touch capabilities with the new iPhone 6s/6s+, I'm trying to add some home screen quick actions to my app. I was able to implement the normal flow of force touching the app's icon in the home screen -> choose one of the quick actions available -> taking care of it properly in all possible app states. My question is: Is it possible to create a silent action among the available quick actions? By silent I mean that a certain action will take place, yet the app won't complete its

ios - Dynamically edit 3d touch shortcut list

倖福魔咒の 提交于 2019-11-30 09:26:58
I want to add a "Continue" shortcut to my game. But when user will finish my game completely I want this to be either removed or replaced by another shortcut. Is this possible? I know 3d touch is handled by ios system, but maybe there are still some options There are two ways to create shortcuts - dynamic and static. Static are added to the plist and never change. Dynamic can be added and removed in code. It sounds like you want a dynamic shortcut, so here's roughly how you would do that: To add: if #available(iOS 9.0, *) { if (UIApplication.sharedApplication().shortcutItems?.filter({ $0.type

How to implement 3D-Touch Peek-and-select?

自古美人都是妖i 提交于 2019-11-30 07:11:42
Phone, Reminders, and Maps use a different 3D-Touch Peek UI allowing to select an action in one go. For instance, force-press on a reminder and select "Remind me on a day" in one go, without releasing the finger. It also differs visually from standard 3D Touch previews using the UIViewControllerPreviewing API as it displays a custom icon alongside left-aligned text. I couldn't find a way to do this using the official API. Did I miss something or is this a private API indeed? I asked my question on the Apple Developer Forums as well and received this reply from Apple: Currently there is not

How do I replicate iOS 10's Apple Music “Peek and pop action menu”

人走茶凉 提交于 2019-11-30 05:22:15
iOS 10 has a feature I would like to replicate. When you 3D touch an album in the Apple Music app it opens the menu shown below. However unlike a normal peek and pop, it does not go away when you raise you finger. How do I replicate this? The closest I got to replicating it is the following code.. It create a dummy-replica of the Music application.. Then I added the PeekPop-3D-Touch delegates. However, in the delegate, I add an observer to the gesture recognizer and then cancel the gesture upon peeking but then re-enable it when the finger is lifted. To re-enable it, I did it async because the

ios - Dynamically edit 3d touch shortcut list

白昼怎懂夜的黑 提交于 2019-11-29 14:05:45
问题 I want to add a "Continue" shortcut to my game. But when user will finish my game completely I want this to be either removed or replaced by another shortcut. Is this possible? I know 3d touch is handled by ios system, but maybe there are still some options 回答1: There are two ways to create shortcuts - dynamic and static. Static are added to the plist and never change. Dynamic can be added and removed in code. It sounds like you want a dynamic shortcut, so here's roughly how you would do that