jamonholmgren / ProMotion

ProMotion is a RubyMotion gem that makes iPhone development less like Objective-C and more like Ruby.
MIT License
1.26k stars 147 forks source link

longpressable and iPhone 6s 3D Touch #758

Open hugoerg56 opened 8 years ago

hugoerg56 commented 8 years ago

On the simulator I can't test this, but any of you know if the longpress action will interfere with Iphone 6s 3D touch or some like that? the real question is "the longpress action works fine on the iPhone 6s?"

markrickert commented 8 years ago

hmmm... as soon as i get access to a device is force touch i'll check this. Some work has already been done to support easy force touch recognition on bubblewrap (https://github.com/rubymotion/BubbleWrap/pull/478).

From a brief glance at the documentation for 3D touch a view controller has to "register itself" in order to use 3D touch, so longpressable should work just fine so long as you don't call this method in your view controller:

- (id<UIViewControllerPreviewing>)registerForPreviewingWithDelegate:(id<UIViewControllerPreviewingDelegate>)delegate
                                                         sourceView:(UIView *)sourceView
hboon commented 8 years ago

A rule of thumb I have been applying for my own apps is: replace long presses with force touch (where reasonable) and fall back to long presses when it's not.