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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -