0

My application attaches a list of UIView controllers to a scrollview controller. As a part of requirements, it is needed to make some of the elements in the individual view controllers clickable. But, if I use a touch point, I get weird cooridinate values like (0,12567234). Is there a way to obtain the actual touch point value? My code loads the views 3 pages at a time.

1 Answer 1

0

How are you determining the touch point? The correct method is

[myTouch locationInView:theView];

You can use any view you like, so can get the coordinates relative to the UIScrollView or its subview. Also, this method returns a CGPoint, which contains float values, not ints, so if you're NSLogging them with the wrong print formatter, you'll see weird values (use %f not %d).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.