This may be a dumb question but I'm a bit confused about where i should and should not declare that I implement a protocol.
Ive been trying to just download the results of a http request to a NSString and most the tutorials i went to lead me to write this block
Everything works fine, but why didn't the compiler yell at me for not stating that I am implementing the protocol NSURLConnection would need to to comply to to be its delegate?
If for nothing else, stating that I'm going to implement a protocol lets xcode help me a bit more in its auto completion.
So why does it let me do this? Should I still state that I implement the NSURLConnectionDelegate protocol just to be sure?
Thanks for any advice.
Ive been trying to just download the results of a http request to a NSString and most the tutorials i went to lead me to write this block
Code:
webdata = [NSMutableData new];
NSString *urlString = [NSString stringWithFormat:@"http://www.google.com"];
myConnection =[NSURLConnection connectionWithRequest:
[NSURLRequest requestWithURL:
[NSURL URLWithString:urlString]]
delegate:self];
Everything works fine, but why didn't the compiler yell at me for not stating that I am implementing the protocol NSURLConnection would need to to comply to to be its delegate?
If for nothing else, stating that I'm going to implement a protocol lets xcode help me a bit more in its auto completion.
So why does it let me do this? Should I still state that I implement the NSURLConnectionDelegate protocol just to be sure?
Thanks for any advice.