I’m increasing the amount of a model field using the following code:
- (IBAction) counterButton: (id) sender {
[model.amount++ stringValue];
}
It was working fine until I upgraded Xcode. Since then I’ve been getting the following error:
"Arithmetic on pointer to Interface 'NSNumber'. which is not a constant size in non-fragile ABI"
When the code was working it incremented the value by 1 each time a UIButton was touched.
any help would be greatly appreciated.
thanks
You cant perform ++ on a
NSNumberwhich in an object not a primitive type.Also it is an unmutable type.
If you want increase the value of amount you can try this: