getting runtime error with NSDecimalNumber?
Objective-C and Swift
1
Posts
1
Posters
2
Views
1
Watching
-
I am getting an error when this line of code runs, I am unfamiliar with NSDecimalNumber so Im not really sure what is wrong with this line and Xcode is not giving me any error until I actually run the code.
if ([unit1 isEqualToString: [_Distance objectAtIndex:0]])
universalAns = [num1 decimalNumberByMultiplyingBy: (NSDecimalNumber*)[NSDecimalNumber numberWithDouble:0.0254]];here is the debugger output up to this point: self (ViewController *) 0x8c8cd10 unit1 = (__NSCFConstantString *) @"inches" universalAns NSDecimalNumber * nil num1 (__NSCFNumber *) (double)0 _Distance (__NSArrayI *) @"8 objects" Any ideas would be helpful, Thanks in advance!