iphone: Implement delegate in class

Posted by Nic Hubbard on Stack Overflow See other posts from Stack Overflow or by Nic Hubbard
Published on 2010-05-17T22:23:02Z Indexed on 2010/05/17 22:30 UTC
Read the original article Hit count: 217

I am trying to call up a modal table view controller using presentModalViewController but I am not sure what to do about the delegate. The following code gives me an error:

MyRidesListView *controller = [[MyRidesListView alloc] init];
    controller.delegate = self;
    [self presentModalViewController:controller animated:YES];
    [controller release];

Error:

Request for member 'delegate' is something not a structure or union

Now, I realized there is no delegate property in my MyRidesListView class. So, how would I add a reference to my delegate there? What am I missing here?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk