iOS Object-Oriented Objective-C Diving Deeper - Classes, Properties and Methods Creating Methods!

What am I doing wrong with this method implementation? AFAICT, the syntax is correct.

  • (float)calculateTip:(float)subTotal { return subTotal * 0.2f; }
variable_assignment.mm
- (float)calculateTip: (float)subTotal {
  return subTotal * 0.2;
}

1 Answer