you are not using id value in method
-(IBAction) backgroundTap:(id)sender { [userName resignFirstResponder]; [password resignFirstResponder]; }
use as instead
-(IBAction) backgroundTap { [userName resignFirstResponder]; [password resignFirstResponder]; }
and then do it like
-(IBAction) btnSubmitLoginPassword{ [self backGroundTap]; [self validate]; }
if you want to change / access the property of the sender, then you must use the (id) of the sender
source share