I create a UIViewController with a button on it. The button's only job is to create a window for drawing some rectangles. (I've taken some code from "QuartzDemo" from Apple's example applications.) Objective C is really giving me fits...
When I try this, nothing happens.
Here's the code for the button:
- (IBAction)startButtonAct:(id)sender
{
QuartzViewController *controller;
NSLog(@"1");
controller = [[QuartzViewController alloc] initWithTitle:@"Dotsie"];
controller.quartzViewDelegate = [[[RectDrawing alloc] init] autorelease];
[[self navigationController] pushViewController:controller animated:YES];
// [controller release];
}
I'm honestly not sure what else anyone needs to see, but here's some of the other stuff:
@interface QuartzViewController : UIViewController
{
QuartzView *quartzView;
UIBarStyle barStyle;
UIStatusBarStyle statusStyle;
}
@protocol QuartzViewDelegate;
@interface QuartzView : UIView {
id<QuartzViewDelegate> delegate;
}
@property(assign) id<QuartzViewDelegate> delegate;
@end
@protocol QuartzViewDelegate<NSObject>
@required
// Draw contents into the given view, using the given context and bounds.
-(void)drawView:(QuartzView*)view inContext:(CGContextRef)context bounds:(CGRect)bounds;
@end
Please help -- this is driving me crazy -- I've been fighting with the same basic problem now for a week...