开发者

Decimal point issue on cocoa app

I there, I'm trying making my first cocoa app,开发者_Go百科 but I'm having problems with float numbers because of the regional settings.

If I write on the TextBox the float number 1.2 I only can get the number 1, but If I write on the same TextBox the same float number but this time with the ',' sign instead (1,2) I can get the right float value.

How can I bypass the regional settings?


You don't want to bypass the regional settings, you want to use a NSNumberFormatter to convert the string in the TextBox to a number.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜