Converting NSDecimalNumber to NSDecimal

I am using the CorePlot library to generate some charts. While I am working on this, I have come to the need to change the X-axis property Xaxis.MajorIntervalLength

, which is NSDecimal.

I tried, but I cannot create the number NSDecimal

. I can only create NSDecimalNumber

and when I try to assign it to a property it throws this error:

Assigning to NSDecimal from incompatible type NSDecimalNumber

      

I know NSdecimal is no longer an Objective-C class, but I guess, but I need to use it somehow!

+3


source to share


1 answer


You can ask yours NSDecimalNumber

for decimalValue

:



plot.property = myDecimalNumber.decimalValue;

      

+3


source







All Articles