views:

175

answers:

1

I've taken some stuff from Apple's QUartzDemo project and am trying to modify it.

I want to create a screen with a button that will then call the rest of the stuff to make the rectanlges from that demo.

I've created a UIViewController that handles my initial view. It has a start button on it. The start button code is:

- (IBAction)startButtonAct:(id)sender
{
    QuartzViewController *controller;

    NSLog(@"1");
    controller = [[QuartzViewController alloc] initWithTitle:@"Name"];
    controller.quartzViewDelegate = [[[RectDrawing alloc] init] autorelease];
    [[self navigationController] pushViewController:controller animated:YES];

}

It dies when on the line with "controller.quartzViewDelate":

-(id<QuartzViewDelegate>)quartzViewDelegate
{
    return quartzView.delegate;
}

with the error:

-[QuartzView setDelegate:]: unrecognized selector sent to instance 0x5274a0

I'm guessing that means that the sender id from startButtonAct isn't the right thing for quartzViewDelegate -- it requires something other than the id from a button.

But I'm completely stopped here. I have no idea, after many hours of working, how to make this work. The difference I can find is that QuartzDemo uses a navigationController, not a viewController, but in my reading, it seems that the navigation controller is basically used for tables, which I don't have.

Okay, I'm very new to this stuff, but Objective C and iPhone programming, and ObjC sometimes gives me fits, but I've traced this through and don't have any more ideas.

Help, please?

A: 

Found the error. Some code in the wrong place... nothing that could help anyone else.