I'm trying to implement a protocol.
I've looked at the documentation here and I understand the concepts although I think I'm missing a few things.
I'm trying to make a view that the user taps on a filename in a table view triggering 'didSelectRowAtIndexPath' which will in turn notify the delegate that the user has selected a file (triggering didSelectFileName in the delegate) and passing the fileName. I've declared the protocol as follows;
@protocol FileList <NSObject>
- (void)didSelectFileName:(NSString *)fileName;
@end
My questions are:
- How do i set the 'fileName' value so that when 'didSelectFileName' is called it has the current value in it
- How do I tell my code to trigger 'didSelectFileName' in the delegate.