從https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html#//apple_ref/doc/uid/20001836-BAJEAIEE如何爲NSURLConnection定義NSMutableData實例?
NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if (theConnection) {
// Create the NSMutableData to hold the received data.
// receivedData is an instance variable declared elsewhere.
receivedData = [[NSMutableData data] retain];
} else {
// Inform the user that the connection failed.
}
我是一個相對較新的iOS6的程序員。首先,我認爲用ARC應該只是?
其次,我該如何聲明receivedData
實例變量?我在猜測@property (strong, nonatomic) NSMutableData *receivedData;
的頭部和@synthesize receivedData
的執行情況。
但是,我仍然想在iOS6中使用多線程和ARC。如果財產申報是
@property (strong, nonatomic) NSMutableData *receivedData;
或只是
@property (strong) NSMutableData *receivedData;
在異步NSURLConnection的的代表接收到的數據?