我有这个方法可以调用另一个方法。如何将 char[] 传递给它而不是在其中包含 char[]?
- (IBAction)goThere(id)sender {
// char hex[] = {0xFF, 0xFF, 0x15}; <-- this is what I want to pass to elseWhere
// NSString *text = "some string"; <-- it would be cool to send other things too.
[self elseWhere];
}
- (void)elseWhere {
char hex[] = {0xDA, 0xFF, 0x15};
...
}
理想情况下,我将能够从 goThere 发送 char[],能够根据需要重新使用 char[],不幸的是我在这方面并不先进。谢谢