データオブジェクトをセレクター呼び出しメソッドに入れる必要がないようにするにはどうすればよいですか?
警告のあるコード (データのローカル宣言) :
NSDictionary *data = [NSDictionary dictionaryWithObjectsAndKeys:@"SiluetaImage", @"ACTION", silueta_id, @"siluetaid", siluetaTyp_id, @"siluetatypid", nil];
[self performSelector:@selector(downloadBinDataForTyp:data:)
withObject:@"SiluetaImage"
withObject:data];
警告なしのコード:
[self performSelector:@selector(downloadBinDataForTyp:data:)
withObject:@"SiluetaImage"
withObject:[NSDictionary dictionaryWithObjectsAndKeys:@"SiluetaImage", @"ACTION", silueta_id, @"siluetaid", siluetaTyp_id, @"siluetatypid", nil]];
セレクター:
- (void)downloadBinDataForTyp:(NSString *)typ data:(NSDictionary*)data
{
ASINetworkQueue *q = [self queue];
NSString *sUrl = @"url_web_service";
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:sUrl]];
NSString *msgLength = [NSString stringWithFormat:@"%d", [[self getMsg] length]];
[request setTimeOutSeconds:60];
[request addRequestHeader: @"Content-Type" value:@"text/xml; charset=utf-8"];
[request addRequestHeader: @"SOAPAction" value:_action];
[request addRequestHeader: @"Content-Length" value:msgLength];
[request setRequestMethod: @"POST"];
request.userInfo = data;
[request appendPostData:[self getMsg]];
[request setDelegate:self];
[q addOperation:request];
[q go];
}