When does NSURLConnection's initWithRequest return nil

后端 未结 5 1368
遥遥无期
遥遥无期 2021-02-18 23:51

Does anyone know in which situations initializing a NSURLConnection returns nil instead of the created connection. The documentation says it\'s possible but fails t

5条回答
  •  感动是毒
    2021-02-19 00:41

    I guess the answer is "Never". Seems only way for NSURLConnection to return nil is failing at [super init]. ([super init] returning nil) But as super class of NSURLConnection is NSObject and NSObjects init just returns self (never nil)

    PS: That's for IOS SDK 4.0, on emulator, can be different on device.

提交回复
热议问题