Can someone answer me how to call one method into another in Objective C on Xcode
+2
A:
You get a pointer to an object that implements the other method and send the appropriate message (e.g. [otherObject doSomething]
).
Chuck
2010-10-12 04:08:16
please be more clear Chuck i dint get you
vidhya jain
2010-10-12 04:10:53
+6
A:
The basic syntax for calling a method on an object is this:
[object method];
[object methodWithInput:input];
If methods returns value:
output = [object methodWithOutput];
output = [object methodWithInputAndOutput:input];
EDIT:
Here is a good example that how to call method from other class:
OBJECTIVE C - Objective-C call method on another class?
Example:
SomeClass* object = [[SomeClass alloc] init]; // Create an instance of SomeClass
[object someMethod]; // Send the someMethod message
NAVEED
2010-10-12 04:09:15