Calling objective-c method from custom C function

Total Post:183

 775  View(s)
Rate this:

I have created an app using MVC like architecture in our GUI app. Model class has some C functions. In C funtions class having some methods of Obj-C class, now I calling those methods using an object of that class.

when I call those methods it will not be executed and also I am not getting any errors.

So my problem is that I am not figure out what exactly is happening.
Is anyone have ideas, to what might be the reason for this?

  1. Post:183

    Re: Calling objective-c method from custom C function

    The question I have asked, I found a solution to run objective-c method through C functions. If anyone have its better solution then please tell me:
    Here is my solution:

    void * refToSelf;
    int callBack()
      [refToSelf customMethod:customArg];

    @implementation CustomClass
    -(id) init
      self = [super init];
      refToSelf = self;
    -(void) customMethod:(int)customArg

      Modified On Dec-19-2015 01:25:47 AM