Questions tagged [3dtouch]

Use this tag when developing apps that use the 3D Touch sensitivity feature on newer Apple Devices (iPhone 6s / 6s Plus and newer).

3dtouch
Filter by
Sorted by
Tagged with
9 votes
2 answers
2k views

How do I localize static UIApplicationShortcutItems?

With the iPhone 6s, Apple has introduced a new feature called "3D Touch". App developers are able to use this technology by using it within their apps or provide so-called UIApplicationShortcutItems ...
0 votes
0 answers
25 views

Detecting force of pressure on Custom ImageView in UIKit

I have developed a custom ImageView in my iOS app that can be moved around by the user. Now I want to determine the precise pressure applied to the ImageView using 3D Touch while it is being moved. ...
1 vote
2 answers
451 views

Detect when 3D Touch Peek and Pop View is Canceled

I have a UITableView with 3D Touch Peek and Pop enabled. I would like to be able to detect whenever the user peeks the view and whenever the user stops peeking the view without popping. I know that ...
1 vote
1 answer
102 views

UIPreviewInteraction on UITableViewCell

I'm wanting to add a UIPreviewInteraction to my UITableViewCell so I can recreate something similar to Apple Music's 3D Touch action. Here's what I've done in my UITableView's cellForRowAt func ...
1 vote
0 answers
835 views

How to implement a 3D touch preview in SwiftUI?

how is it possible to implement a long press or 3D touch preview like the google news example or the one from instagram? When tapped in the preview, it should be forwarded to the destination"page....
0 votes
1 answer
1k views

3D Peek and POP in swift

I'm trying to implement 3D Touch Peek and Pop in my swift code. When the user presses deeper on the peek view, array of preview actions will appear (Share, Update, Delete). What I need is when user ...
4 votes
1 answer
2k views

Prevent Drag of images and Links on newer iPads with 3D Touch

I'm implementing press and hold to drag on a table of elements for a webpage. This feature is very difficult, due to the various long-press menus on Android and iOS, and cross browser touch ...
0 votes
1 answer
2k views

How to implement Peek and Pop in SwiftUI?

Many iOS Apps nowadays use Peek and Pop to quickly present a Preview of a DetailView. However, all I find on the Internet are Tutorials on how to implement this using UIKIT. Question: How do I ...
6 votes
2 answers
3k views

WKWebview allowsLinkPreview to false breaks text selection

We have an app that uses WKWebview, but sets allowsLinkPreview to false because we don't want link preview behavior. It seems that starting with iOS 13.4, on devices that don't have 3D touch ...
29 votes
6 answers
11k views

Launching with UIApplicationShortcutItem

I'm implementing some 3D touch quick actions for my iOS 9 app in swift, and I have a curious issue. When my app is in the background and I launch with the quick action, everything goes as planned. ...
2 votes
2 answers
893 views

Static Quick Actions not working in objective c iOS

I am very new to the iOS Application development and I have been following tutorials to build my career . So starting with I am trying to Implement Static Quick Actions in Objective C as per client ...
0 votes
0 answers
65 views

Weight things using iPhone screen

Swift has UIForceTouchCapability class which allows to measure things' weight using iPhone screen with touch force parameter. This class is available for iPhones which have 3D touch capability. How's ...
11 votes
3 answers
2k views

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

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 ...
3 votes
1 answer
109 views

Adding an icon or image on a UIPreviewAction

I wonder if there is any way of adding an icon to the quick actions associated with a peek & pop preview (reachable through 3D touch). I have created a couple of preview actions using: ...
6 votes
5 answers
2k views

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

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 ...
1 vote
1 answer
3k views

How to implement Haptic/3D Touch in SwiftUI?

How can I detect the force of a touch gesture in SwiftUI? I can already do the following: view.onTapGesture { ... } But how do I fire a different closure based on touch force, or wrap a UIKit ...
1 vote
0 answers
73 views

How to call a view controller via Quick Actions (3D touch) Swift

I'm trying to implement a 3D touch command where if the user presses "New scan", then the view controller ProcessedImageViewController is called. I have already set up the Info.plist to ...
5 votes
1 answer
333 views

UIApplicationShortcutItem without launching

When a user taps on a home screen menu UIApplicationShortcutItem via 3d-touch, the default behavior is for iOS to bring your app to the foreground. Is there any way to handle a ...
1 vote
2 answers
1k views

Shortcut Items, Quick Actions 3D Touch swift

I am for some reason having some troubles figuring out the Shortcut Items in my app. I have followed all the tutorials and I believe that I have done everything right; however, it is acting really ...
6 votes
3 answers
1k views

Touch events are delayed near left screen edge on iOS 9 only. How to fix it?

I am developing a keybaord extension for iOS. On iOS 9 the keys react imediatelly except for keys along left edge of the keyboard. Those react with around 0.2 second delay. The reason is that the ...
3 votes
0 answers
422 views

What is completionHandler at performActionFor shortcutItem for?

func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) I'm doing the UIApplicationShortcutIcon ...
2 votes
2 answers
984 views

How to register for previewing single cell under 3D Touch?

Currently I have the following code in viewDidLoad: if #available(iOS 9.0, *) { if traitCollection.forceTouchCapability == .Available { registerForPreviewingWithDelegate(self, sourceView: ...
0 votes
1 answer
299 views

go directly to different page using quick Action shortcut in swift

my app has 2 pages(VCs) which are created and being controlled in a BossPageViewController and I want to give the user an option of going directly to second page using a Shortcut action. now I know ...
0 votes
1 answer
765 views

Has Apple deprecated iPhone 3D touch in Swift?

I made a game 2 years ago using the 3D touch feature in Swift because it was pretty new but I've never released the game because I got a new contract. Now I have time I want to release it but the code ...
1 vote
1 answer
267 views

How to disable 3D Touch Link Preview

Since iOS10 the "3D Touch link preview" has been enabled by default, but how can I disable it in my app? Documentation says it's possible by setting allowsLinkPreview to false, but doing it separately ...
0 votes
1 answer
411 views

How can iOS 3D touch on app be automated?

I write Appium UI tests for my iOS app. Some of the tests have such workflow: an app is sent to background the user does "force touch" on the app's icon, until menu (shortcuts) appear an app is ...
0 votes
1 answer
1k views

Do something with Quick Action

Sorry if this is a dumb question, Setting up a 3D Touch quick action. I put everything into the .plist file and I had to put this into my AppDelegate.swift file AppDelegate.swift func application(_ ...
1 vote
0 answers
174 views

How to disable custom actions buttons on Apple Watch when receiving push notification

I am developing an iOS app with 3D Touch push notifications. The notification has a couple of custom actions defined. When receiving the notification on an Apple Watch, these same custom actions are ...
1 vote
2 answers
855 views

iOS Haptic Touch API Possibilities

Since we are losing 3D Touch API's with iOS 13, such as UIViewControllerPreviewing, UIContextMenuInteraction seems to be the replacement. UIContextMenuInteraction is good if you want to put up a menu ...
5 votes
0 answers
136 views

3D Touch Peek and Pop messes up SpriteKit physics

I have implemented 3DTouch peek and pop actions in my game. Essentially I have a MenuScene and a GameScene. In the MenuScene I have 2 CollectionViewControllers (world select and level select). I can ...
5 votes
1 answer
1k views

How to enable peek and pop in iOS WebView?

I'm loading my website in an UIWebView in my iOS app. How can I enable peek and pop (3d touch) for the links in the WebView? Any ideas?
2 votes
2 answers
2k views

shouldInteractWithURL called twice on 3d touch

Below is the issue that i am trying to fix. I have a textView whose text is an attributed string with link attribute. On clicking the link, i should go to other screen. So, I am performing that screen ...
10 votes
1 answer
732 views

Instagram-like force touch popup modal

I'm trying to replicate force touch functionality of Instagram where 1) Put your finger on an image and it gets a little darker (hover effect, easy) 2) Press a little harder and a popup modal ...
11 votes
2 answers
5k views

What is appropriate size of icon for 3D Touch shortcut item on home screen?

I couldn't find it on Icon and Image Sizes. But I mean, what is the size of following icons?
1 vote
1 answer
236 views

registerForPreviewing in a tableview cell, iOS, Swift

I'm trying to add this to a table view cell but because it is awake from nib and not view did load it won't allow it. if traitCollection.forceTouchCapability == .available { ...
1 vote
1 answer
396 views

Peek-and-Pop UIView to show SFSafariViewController

I have a UITableView and in each cell theres a UIView added as subview. What I currently have is a UITapGestureRecognizer to open the In-App-Safari whenever I click one of those UIViews. However I'm ...
10 votes
2 answers
1k views

Make XCUIElement perform 3D touch for Automate UITest?

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 ...
0 votes
0 answers
125 views

Simulator 3d Touch not available option in xcode 10.2

I have added the following options in the app's plist <code> <key>UIApplicationShortcutItems</key> <array> <dict> <key>...
4 votes
0 answers
357 views

3D Touch quick actions not working when called from didFinishLaunchingWithOptions

I'm implementing 3D touch quick actions in my app and I have the following problem: When the app is already running and so the quick action is initiated through perform Action For Shortcut Item, it ...
2 votes
2 answers
181 views

3D Peek and Pop memory leak

After implementing peek and pop I saw a problem that the controller that register a view for previewing not release the view after view is deallocated. I have created a simple project with a tableView,...
2 votes
1 answer
1k views

How to check 3D touch available in iPhone programmatically? [duplicate]

I have my ios application I want to check how 3D touch available means (iPhone 6s or iPhone6s plus)? so how can I check it?
0 votes
3 answers
780 views

3D touch shortcut to a tab view and then performing a segue

I am having an issue using the 3D touch shortcuts inside my application. My app uses tabs but I would like to redirect the user into a tab then also into another segue when they press the create wish ...
-1 votes
1 answer
138 views

How to go to specific tab bar view via 3D Touch quick items

I'm trying to go to any out of the 3 tab bar elements that I have in my storyboard depending on which quick action I select when 3D Touching on the app icon. I want to still be able to see the tab bar ...
1 vote
1 answer
121 views

Peek & pop does not trigger only on the last cell

I have a ProfileVC that contain a list. I can click on any of the row cell will show peek and pop feature. ProfileVC.swift I added the extention extension ProfileViewController : ...
3 votes
2 answers
393 views

3D Touch calls viewDidDisappear when popping VC

I am struggling around with the peek and pop feature in my iOS app. In the viewDidDisappear method in the VC I want to pop, I have a function to remove some observers related to the model. If I now ...
7 votes
2 answers
3k views

Detect when an iOS 3D Touch peek has finished (without a pop)

I just started adding basic 3D Touch functionality to my app, and the first attempt at adding it has gone well, seems fairly straightforward. I was wondering however whether there was a way to detect ...
12 votes
1 answer
1k views

3dtouch to present(peek without pop) UIView like contacts app

I'm trying to implement 3D Touch feature that presents a summary of information (like Peek). But I don't want that it pops. I just want to preview the information like contacts app does with contatcs: ...
20 votes
1 answer
5k views

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

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 ...
1 vote
1 answer
540 views

Peek and Pop for iPhone XR and iPhone XS

I want to add a peek and pop feature to my application. I managed to do it, but now I want to add support for iPhone 5s and iPhone Xr, in which there is no 3D Touch. override func ...
0 votes
1 answer
82 views

Which one of the App life cycle methods gets called when 3DTouch home screen quick actions are presented?

I need to present a phone number in one of the dynamic quick actions, if there is such a number in the clipboard. I tried putting the code to do this in applicationDidBecomeActive(_ application: ...

1
2 3 4 5
8