From withing a UIViewController that is tied to a UIView (drawn in a nib file), i try to add another view, as a subview to the first view.
In case you are confused: UIViewController -> UIView + GraphView (extends UIView)
So i am saying:
GraphView *myGraphView = [[GraphView alloc] init];
graphView = myGraphView;
[self.view addSubview:graphView];
[myGraphView release];
I have also tried with insertSubview
.
The UIView shows up and the GraphView subview is instantiated correctly (its properties are there and i can access its methods). But it never shows on the screen!
Its drawRect
method is never called (i have an NSLog
in there that never shows), even if i manually call [graphView setNeedsDisplay]
.
Does anyone have a clue?
Thanks a lot!!!