I’ve reasonable successfully setup access to another method in the following way:
SomeScript.m (the class I am trying to access)
-(void)amethod{....
codeA.h (the class that is accessing amethod) within the {} has:
SomeScript* myScript;
codeA.m
myScript = [[SomeScript alloc] init];
[myScript amethod];
What I want to do however is make it an instance variable of the app delegate but when I put the SomeScript* myScript; and the myScript = [[SomeScript alloc] init]; in AppDelegate.h the codeA.m does not recognise it.
First, add a property
myScripttoAppDelegate:In AppDelegate.h
In AppDelegate.m
Now that you have declared and initialized the property, you can use it like the following from other classes: