Iphone area detection

In my application, the user must insert a phone number, which is then displayed elsewhere.

In the application for contacts when displaying a phone number, it is automatically displayed in the format of the language selected by the user.

Is there a way to do this automatically or a way to detect an area and then adapt the displayed string?

+4
source share
1 answer

You can use NSLocale to get this type of information.

[NSLocale currentLocale]; 

Check the documentation for more information: http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSLocale_Class/Reference/Reference.html

+3
source

Source: https://habr.com/ru/post/1306455/


All Articles