I have an Obj-C method like this:
-(void)getUserDefaults:(BOOL *)refreshDefaults
{
PostAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
if (refreshDefaults) {
[appDelegate retrieveDefaults];
}
}
When I call it that, I get no warning:
[self getUserDefaults:NO]
When I call this, I get a warning:
[self getUserDefaults:YES]
warning: passing argument 1 of 'getUserDefaults:' makes a pointer from an integer without cast
NOTE. I always call the method that passes NO first, and then passes YES after a while
Can someone fill me with the fact that the problem is here? Thanks.
source
share