我很難找到NSURLConnection委託方法實現的任何示例。NSURLConnection委託方法
我想通過點擊按鈕發送帶有HTTP帖子的數據。不知道如何製作「提交」屏幕和「提交」。 (我知道如何使用微調,並將使用它們)
我使用此代碼根據botton單擊操作,但無法使用任何委託的東西。不知道如何用我目前的設置來實現它們。
NSMutableURLRequest *request =
[[NSMutableURLRequest alloc] initWithURL:
[NSURL URLWithString:@"http://myURL.com"]];
[request setHTTPMethod:@"POST"];
NSString *postString = [wait stringByAppendingString:co];
[request setValue:[NSString
stringWithFormat:@"%d", [postString length]]
forHTTPHeaderField:@"Content-length"];
[request setHTTPBody:[postString
dataUsingEncoding:NSUTF8StringEncoding]];
//[[NSURLConnection alloc] initWithRequest:request delegate:self];
[NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
[SVProgressHUD dismissWithSuccess:@"Submission Successful"];
第二個鏈接,portugese一個真的很有幫助,即使我不明白protugese,謝謝.. – Bhimbim 2017-07-17 09:23:56