In the below method calls from a single object, how to make the handler method to run 1st and then the main method in Objective-C?
Does it run in Asynchonous or Synchronous way?
Main method :AuthenticateMobileServer
handler Method :Handler
[mobile_Obj authenticateMobileServer:self action:@selector(handler:)];
Thank You.
I’m not sure if I’m getting what you’re asking. But first of all please do use correct naming/capitalization for Objective-C! So please take a look at (http://developer.apple.com/mac/library/documentation/cocoa/conceptual/objectivec/articles/ocLanguageSummary.html)
(method names and variable names are in lowerCamelCase! Only class names are in CamelCase)
so it should be
[mobileObj authenticateMobileServer:self action:@selector(handler:)]Now to your question. By sending a
authenticateMobileServer:action:message to mobileObj only that method is executed.@selector(handler:)is only a function pointer.