In the following code example, I want to be able to call backgroundTap from another function btnSubmitLoginPassword. What parameter should I pass?
-(IBAction) backgroundTap:(id)sender{
[userName resignFirstResponder];
[password resignFirstResponder];
}
-(IBAction) btnSubmitLoginPassword{
[self backGroundTap:?????????]
[self validate];
}
PengOne's answer is good, but the precise answer to your question is: pass nil
for the sender parameter:
[self backgroundTap:nil];
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