Sunday, 25 August 2013

Returning a class object in java equivalent for objective-C

Returning a class object in java equivalent for objective-C

I have a Java class where I'm returning the class objects using the add
method. I'm trying to write an equivalent Obj-C method. Should I have to
declare the objective C method as void and update the class variables
inside the method?
public class TesCodeRequest{
private String apiKey;
private String apiSecret;
private String endpoint;
public TesCodeRequest(String apiKey, String apiSecret, String
endpoint) {
//initialization done here
}
public TesCodeRequest add(String endpoint, Object... fields) {
//method
}
}
Expected add method in Obj-c
-(void)add:(NSString *)endPoint andObject:(NSArray *field{
//endpoint and other variables to be updated here.
}

No comments:

Post a Comment