You initialize your view by calling [[cro alloc] init]
. Since you're not calling initWithFrame:
this will result in a view with zero width and height. Calling setNeedsDisplay
on such a view has no effect because there is nothing to display.
Change your first line in viewDidLoad
to something like
hi = [[cro alloc] initWithFrame:CGRectMake(0, 0, 320, 320)];
(adjust the size as needed)
Alternatively, you might want to use the cro
instance that you already have in your storyboard instead of instantiating a new one. The storyboard instance is the one you're seeing, the hi
instance is actually invisible with your current code. (btw, if you expect other people to read your code, you might want to start using sensible variable and class names.)