iOS Tapped Event on a Chart
Posted: Fri Feb 24, 2012 5:43 pm
I don't know if this posted in the correct forum - I don't see a forum for the new Mobile solution.
I have three charts on a view (similar to the demo code). I want the user to be able to tap on a chart and I get an event so I can take some action. I have tried many different ways but nothing works.
I would normally subclass the chart and override TouchesEnded - but this causes the app to crash with the following error:
System.Exception: Failed to find selector TapGesture on iosapp.viewGraphCoreSKU+ChartViewController
at MonoTouch.ObjCRuntime.Runtime.GetMethod (IntPtr klass, IntPtr selptr) [0x00000] in <filename unknown>:0
at (wrapper native-to-managed) MonoTouch.ObjCRuntime.Runtime:GetMethod (intptr,intptr)
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0
at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in <filename unknown>:0
at iosapp.Application.Main (System.String[] args) [0x00000] in <filename unknown>:0
I just need a simple way to determine that the user tapped on a graph (not a series). In the future I may need to know where on a series they tapped so I can popup some additional information - but for now tapping anywhere on the graph should give me an event.
Sample code would be most appreciated.
Thanks!
I have three charts on a view (similar to the demo code). I want the user to be able to tap on a chart and I get an event so I can take some action. I have tried many different ways but nothing works.
I would normally subclass the chart and override TouchesEnded - but this causes the app to crash with the following error:
System.Exception: Failed to find selector TapGesture on iosapp.viewGraphCoreSKU+ChartViewController
at MonoTouch.ObjCRuntime.Runtime.GetMethod (IntPtr klass, IntPtr selptr) [0x00000] in <filename unknown>:0
at (wrapper native-to-managed) MonoTouch.ObjCRuntime.Runtime:GetMethod (intptr,intptr)
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0
at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in <filename unknown>:0
at iosapp.Application.Main (System.String[] args) [0x00000] in <filename unknown>:0
I just need a simple way to determine that the user tapped on a graph (not a series). In the future I may need to know where on a series they tapped so I can popup some additional information - but for now tapping anywhere on the graph should give me an event.
Sample code would be most appreciated.
Thanks!