0 Hi, i am using Core-plot . but when i declare the normal UIView as CPLayerHostingView,how can i handle drawRect of that view , i cant give another custom UIview name and write code in drawRect of that view?please any help to handle drawRect of CPLayerHostingView?
+1
A:
Put the CPLayerHostingView inside another UIView. The background from your custom UIView will show through if you use transparent fills in the graph.
Eric Skroch
2010-05-28 22:32:42
but i want to handle touch event on CPLayerHostingView,is it possible?
Mikhail Naimy
2010-05-31 06:46:42
It depends on what you need the touch event for. Core Plot already support touch events for scrolling the graph.
Eric Skroch
2010-05-31 13:58:08
A:
Put the CPLayerHostingView inside another UIView. The background from your custom UIView will show through if you use transparent fills in the graph.
i did this but i get on exception like this Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setHostedLayer:]: unrecognized selector sent to instance 0x5d20910'
anwer
2010-08-06 09:37:34
Make the CPLayerHostingView a subview of the UIView. You still have to add the Core Plot graph to the CPLayerHostingView. It sounds like you tried to add it to your UIView.
Eric Skroch
2010-08-06 11:30:03