var Rating = self.currentPerson.Rating
let c = Rating - 1
Im trying to get the value x
of self.currentPerson.Rating
and subtract 1 from value x
. But Im only getting the error bellow.
Error : Binary operator '-' cannot be applied to operands of type 'NSNumber' and 'Int'
Question : How do I solve this?
Thanks
Problem solved.
By simply adding
.intValue
.