This should work to pass the expression to the void expression.
(void)[self.emailField becomeFirstResponder];
(Even I cannot reproduce the warning. However, this may depend on warning flags.)
For your editing:
BOOL ignore = [self.emailField becomeFirstResponder];
Probably
BOOL ignore = [self.emailField becomeFirstResponder]; ignore = ignore;
the warning should be removed. (He does with my flags.) However, this is an ugly hack.
By the way: There is a reason for the attribute. Perhaps you should double-check if this is good, and not check the return value.
source share