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

markodr
markodr
1,534 Points

The method doesn't work.

Can somebody explain to me why this code doesn't work? I tried also without self but I have the same problem. Regards.

variable_assignment.mm
-(float)calculateTip:(float)subtotal{
  self.smor=subtotal*0.2;
  return self.smor;
}