I have my main iOS view, with an UIVIew as subview linked to a class (called graphView).
My graphView has a drawRect method that is initiated upon application start.
Now, clicking on a button in the main view, I would like the sub UIView to refresh (so drawRect restarted) with specific parameters.
How can I do that, i.e. how can I access the graphView class that was initially instanced ?
Thanks
You can request to update the view by calling setNeedsDisplay on the UIView. Then the drawRect method should be called by the OS.
If you have created your subview in XCode designer, create an outlet of the UIView in the UIViewDelegate to get access to the subview instance.