views:

32

answers:

1

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.

A: 

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).

David Kanarek