How do I call a function from the model that binds the model delegate to the delegate?

I am designing a model that UIPopoverController

the iPhone can have . The model has a delegate (class UIViewController

), I bind a function that adds UITapGestureRecognizer

for the delegate in the model, how can I initialize the model and call the function.

I can do this because I found that Xcode called the same name function in the delegate, which did not call the function in the model;

Here's some code:

if ([self isKindOfClass:[UIViewController class]])
{
    UIViewController *presentViewController = (UIViewController*)self.delegate;

    [presentViewController.view addSubview:INviewController.view];

    [self addGesture]
}

self.tapGR = [[UITapGestureRecognizer alloc]initWithTarget:self.delegate action:@selector(test)];

      

+3


source to share





All Articles