How can I detect touch points in my UIScrollView
? The touches delegate methods are not working.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
Set up a tap gesture recognizer:
and you will get the touches in:
This works also on touch down event.
In the currently as correct marked answer you can get a
touch point
only at a "Tap" event. This event seems only to fire on "finger up" not on down.From the comment of yuf in the same answer you can get the
touch point
from the underlying view also within theUIScrollView
.According to Apple's documentation the
gestureRecognizer
does:which means to me that I can decide if a
gestureRecognizer
should recieve a touch or not.You can make your own UIScrollview subclass and then you can implement the following:
If we're talking about the points inside the scrollview then you can hook with the delegate method:
and inside the method, read the property:
from the scrollView to get the coordination.