The problem is that fullName
is the name of a method. It should be invoked on self
with square brackets.
Since saySomething:
expects a single parameter, you need to either (1) remove the @"Hello %@"
portion of the call, like this:
-(void)sayHello {
[self saySomething:[self fullName]];
};
or to make a single string from @"Hello %@"
and [self fullName]
, like this:
-(void)sayHello {
[self saySomething:[NSString stringWithFormat:@"Hello %@", [self fullName]]];
};