Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where's the NSURLConnection protocol?

The documentation of NSURLConnection says that there are delegate methods like

connection:willSendRequest:redirectResponse: 

But the documentation doesn't mention which delegate protocol to implement. Well, I assume there just isn't any protocol for the delegate, so everything is just optional?

like image 888
openfrog Avatar asked Dec 13 '22 00:12

openfrog


1 Answers

It's an informal protocol implemented in NSURLConnection.h as a category on NSObject:

@interface NSObject (NSURLConnectionDelegate)

That means any subclass of NSObject can be a delegate for NSURLConnection. Yes, all delegate methods are optional.

like image 103
Ole Begemann Avatar answered Dec 26 '22 22:12

Ole Begemann