I am new to Objective C and iPhone development.
I\'m working with a basic calculator. I want to add a large value in text field. How can I display large values like this
Use Double data type. And then convert it into string then pass that string to your textField.
For eg:-
double result;
NSString *strResult = [[NSNumber numberWithDouble:result] stringValue];
It will give you exponential string.
And instead of a UILabel
use UITextField
.
You could set up a NSNumberFormatter with NSNumberFormatterScientificStyle and call stringFromNumber... However, the issue I think is going to be with the precision you are hoping to support requires a specialized framework. There might be one based on GNU MP Bignum library out there, but I don't know it off hand.