ios - UITextview shows text Arabic but numbers English -
i want show arabic text , number of uislider
value in uitextview
example:
مقدار= ۴۰
i using code:
self.mytextview.text= [nsstring stringwithformat:@"%f", self.myslider.value];
uitextview
shows arabic text correct value adding english characters. how can concatenate slider value uitextview
show them arabic characters too.
you should use nsnumberformatter
.
nsnumberformatter* formatter = [nsnumberformatter new]; [formatter setlocale:[[nslocale alloc] initwithlocaleidentifier:@"ar"]]; textview.text = [formatter stringfromnumber: @(slider.value)];
Comments
Post a Comment