According to Apple…
https://developer.apple.com/library/content/samplecode/URLCache/Listings/Classes_URLCacheConnection_m.html
…we should do:
if ([response isKindOfClass:[NSHTTPURLResponse self]])
Is it the same as doing if ([response isKindOfClass:[NSHTTPURLResponse class]])?
Ok, Martin R‘s comment is right, it’s the same.
For any class, I can do either
[ClassName self]or[ClassName class]for the same result.And I can override both of them:
In fact, all NSObject instance methods (-) become class methods (+) for a Class.
Pro about manipulating ‘self’:
Con about manipulating ‘self’: