Keyboard Differences Between Simulator and iDevice - ios

I have noticed a weird "bug" ,developing an app for ios7 . Having set keyboard style ,at UITextFields , like this :
MyUITextField.keyboardType = UIKeyboardTypeDecimalPad;
everything seems to be working as expected at simulator.
However, when app is running at every iDevice , the expected dot(.) symbol of keyboard , is replaced by comma . Is it a bug , or something that i didn't pay attention to ? If it isn't a bug , what change should be made ,considering the textfields keyboard type?
Thank you very much!

The character on that key is governed by the current locale so it depends on your device's locale. In some locales, a decimal separator is a comma and in others (US) it is a dot...
Try changing the locale on your device.

Related

XCode: Use decimal pad that ALWAYS displays dot '.' and not comma ','

I am new to Swift and this is my first application. I essentially want a user to enter two numbers, that I can use for some calculations. For the text fields I used the option "Decimal Pad" as keyboard type. With the simulator it works well - on my phone, however, the dot is shown as a comma, which causes the app to crash. Is there an easy fix for this problem? I don't want any global changes for the location or the keyboards used, but just a fixed decimal pad with dot instead of comma.
Thank you!

KeyboardType numeric is not working in React native iPad

I'm implementing an App only for iPad and apparently react native doesn't support numeric keyboard type for iPad. just want to know any idea how to manage keyboard to show only numbers.
I tried some regular expression but it doesn't work properly.
For some reason this is not supported for Ipad. So you will need to either:
1) Show non-numeric characters but only accept numeric characters (via code).
2) Use this library react-native-custom-keyboard.
Try
keyboardType = 'number-pad'
Hope it works
Or read some article

iOS simulator cannot get custom location when debugging

After updating to Xcode 5.0.2, it seems that iOS simulator custom location option is not working propertly. When I prompt this
And reopen again the custom location dialog
I end getting the lat/lon values without decimals. Also, if I prompt a . instead of a comma, some times the dialog replaces the point with a comma, and sometimes deletes the decimal values. I've tried closing the simulator, changing hardware and restarting Xcode with no results.
There is a bug in the modal "Custom Location" window of iOS Simulator that affects users who have the comma set as the decimal number separator.
If you type the coordinates with the format XX,XX and you press OK, the numbers after the comma are truncated.
Try inputing both coordinates with the format XX.XXX ( 2 digits + a point (.) + 3 digits) then press OK, then quit the iOS Simulator. When you launch it again, it'll have the desired location.
If you go to the same "Custom location" windows you are going to visualize the coordinates in format XX,XX, but DO NOT PRESS OK in that windows, just press Cancel, because if you press OK they will be truncated again.
You can use this Macro #if (TARGET_IPHONE_SIMULATOR) and manually set a custom location in your code.
Hope it helps
It seems that the iOS Simulator is accepting only decimals with dot instead of comma.
For your language (spanish, I think), the Mac OS put comma in decimal numbers. I had the same problem because my Mac OS is in portuguese, that uses the comma as default for decimal numbers.
To change this setting, go to System Preferences > Language & Region > Advanced... and change the Decimal value in the number separators from comma (,) to dot (.) (you can change the currency separators if you want).
Than, every time you open the custom location prompt, decimal numbers of lat/lon values will appear with dot instead of comma.
I hope it has helped you, I couldn't post images because of my poor reputation.
In Xcode,Product -> Scheme -> Edit Scheme... (command + <).
Select Run/Debug from Side Menu, options tab Select "Allow Location Simulation" and select a default location to none. The default location is the reason for custom location changing.
Set your custom Lat/Long to Simulator...

kasra not displayed on iOS

When I write arabic text containing the letter kasra (unicode character 0x650, phonetic equivalent i) to a button, the kasra is not displayed. Thus, the word mumkin appears as mumkn. If I inspect the NSString in Xcode, the kasra is present, but the kasra is not displayed in the iPhone simulator or on a real iPad. The other two short vowels (fatha and damma) are displayed correctly.
The arabic letter kasra (unicode character 0x650) is missing from all of the built-in IOS7 fonts that i have tried.
The solution was to build a different font into my app- I used AGA-Rasheeq-Bold.
This may be a bug. I just tried it in the storyboard editor and it does not seem to work. I created a string in the MAC Notes application, copied and pasted. It displays correctly in the left hand properties panel, but not in the button itself. Could you provide the exact Unicode string? You may need to open a bug report with Apple.
I can confirm that it works correctly in a Label field, but not a Button (IOS 6.1 and Xcode 4.6.3)
Try attributed text. This seems to work around the issue.

Can the iOS keyboard be programmed not to automatically insert a period for two spaces?

On the iOS platform, I have a UITextField where I am using the ASCII keyboard layout. I notice (like the keyboard works in other apps) that when I type space + space, a period '.' is inserted into the text field. This is all normal iOS stuff...
But can I configure the text field or the keyboard somehow so that this "two spaces == period" behavior is turned off?
One possible solution (albeit not a perfect one) has been posted here ... http://www.mailinglistarchive.com/phoenix-iphone-developer-group#googlegroups.com/msg00037.html

Resources