views:

116

answers:

2

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
please be more clear Chuck i dint get you
vidhya jain
+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];

More Detail


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
thanks naveed it helped!
vidhya jain