我想知道服務器是否應該有特殊的設置來使用nsurlconnections?當我嘗試創建連接和身份驗證。我沒有收到任何錯誤或警告,但沒有連接。nsurlconnection服務器需要特殊設置?
請問任何人請在此澄清我。
感謝
編輯:這是我的代碼目前使用
- (void)viewDidLoad {
[super viewDidLoad];
NSURLRequest *theRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"loginURl"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];
NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
[webView1 scalesPageToFit];
if (theConnection) {
receivedData = [[NSMutableData data] retain];
} else {
NSLog(@"Connection Failed");
}
}
您可能需要提供更多的信息和接受更多的答案,得到的答覆 – 2011-05-10 11:05:04
你能告訴我你想這樣我可以告訴ü – pa12 2011-05-10 11:06:44