IOS 7: drag and drop in UITableView / delaySontentTouches seems to be inoperative

I have an iPad app with draggable content in a UITableView ... a TableView scrolls horizontally and is full of draggable images (subclass of UIImageView with rewritten touchesBegan: etc.)

Prior to iOS 7 tableView.delaysContentTouch=YES; The UITableView works as expected, and the application could distinguish between horizontal scrolling in the View table (quickly dragging your finger across the table) and dragging an item inside the tableviews contentView (hold your finger for a second while dragging and dropping until the table view moves to touchesBegan: subclass of UIImageView in contentView.

Now, under iOS 7, scrolling is almost impossible, because dragging and dropping content immediately works. The code has not been changed.

Has anyone produced something similar and found a solution?

Thanks in advance!

+6
source share
2 answers

delaysContentTouches does not work on iOS7 and 7.02, this seems like a mistake, you can use touchhesBegan and touchsCancelled (which is sent if the user scrolls) as a workaround to properly handle your touchEvents.

+1
source

I had a similar problem and tried to solve the problem with workarounds. I had Gold Master IPSW installed on my iPhone 5. Then I upgraded to iOS 7.0.2. Today, my phone had activation problems, and I had to restore the phone (now it is restored to the latest version of iOS). Scrolling problems have disappeared. So, I assume that it was associated with the old ipsw, which was not properly updated to iOS 7.0.2.

0
source

Source: https://habr.com/ru/post/954935/


All Articles