別のメソッドを呼び出すこのメソッドがあります。内部に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[] を再利用できるようにすることができますが、残念ながら、私はこれに精通していません。ありがとう