0
我有一個Java類,我使用add方法返回類對象。我正在嘗試編寫一個等效的Obj-C方法。我是否需要將客觀C方法聲明爲void並更新方法內的類變量?返回java對象中的類對象Objective-C
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
}
}
中的OBJ-C預計add方法
-(void)add:(NSString *)endPoint andObject:(NSArray *field{
//endpoint and other variables to be updated here.
}