如何?我想使用2 NSMutableData

时间:2013-04-29 04:48:43

标签: objective-c nsmutabledata

我想使用2个NSMutableData 来自viewDidLoad 怎么用?

@property(strong,nonatomic) id sMemberID;
@property(nonatomic,assign) NSMutableData *receivedData;
@property(nonatomic,assign) NSMutableData *receivedData2;
@property(strong,nonatomic) NSString *statusMem;

1 个答案:

答案 0 :(得分:0)

假设您有一个名为NextViewController的ViewController中的receiveData和receiveData2,

然后我们可以这样做,

NextViewController *nextViewController = [[NextViewController alloc] initWithNibName:@"NextViewController" bundle:nil];
[nextViewController setReceivedData: sendData1];
[nextViewController setReceivedData2: sendData2];
[self presentViewController:NextViewController animated:YES completion:nil];

也改变非原子,分配给非原子强

@property(nonatomic,strong) NSMutableData *receivedData;
@property(nonatomic,strong) NSMutableData *receivedData2;