How would this code be different if the method was in a different class?
[saveButton addTarget:self action:@selector(saveArray) forControlEvents:UIControlEventTouchUpInside];
Pass the object (which responds to the method) as the target parameter.
[saveButton addTarget:targetObj action:@selector(saveArray) forControlEvents:UIControlEventTouchUpInside];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With