Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Numbers

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa
Mac Cocoa  
Author Message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Jan 31, 2009 3:09 pm    Post subject: Numbers Reply with quote

SO - How to split a NSDecimalnumber between decimal & integer & back

"For example, if I have 10,5, how get 10 & 5?

And if I have 10 & 5, how return to 10,5?"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Mon Jul 13, 2009 1:38 am    Post subject: Reply with quote

Determining the number of decimal numbers for a currency

"Using the UK locale, a currency looks like this: £1,234.56. Using the Ger-
man (Germany) locale, a currency looks like this: 1.234,56 € and finally, a
Japanese currency: ¥1,234"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Wed Aug 12, 2009 10:01 pm    Post subject: Reply with quote

SO - What’s the difference between using CGFloat and float?

"I tend to use CGFloat all over the place, but I wonder if I get a senseless
'performance hit with this. CGFloat seems to be something "heavier" than
float, right? At which points should I use CGFloat, and what makes really
the difference?"
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Mar 06, 2010 8:52 pm    Post subject: Reply with quote

MF - How to get the value of NSDate Compare?

"Convert the two dates into numbers using the timeIntervalSinceReference-
Date method. Then you can simply subtract them to get the difference mea-
sured in seconds."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Fri Apr 23, 2010 5:16 pm    Post subject: Reply with quote

MF - How Do I Convert from an NSString to a double?

"You have to use the NSNumberFormatter class or, if you want to hardcode
the format, you could do some string operations to insert commas at the
right places in the string."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Sun Jan 16, 2011 1:17 am    Post subject: Reply with quote

MF - What to use double, long double, CGFLoat or NSNumber?

"I have spent some hours looking into this and NSDecimalNumber should be
the one to use in this case. I have found some examples for it..."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Wed Apr 04, 2018 9:11 pm    Post subject: Reply with quote

so - NSNumberFormatter currency symbol

"My application is allowing user to select various currencies for spendings
tracking. I have a label which displays the amount with currecy symbol. I'm
using NSNumberFormatter with kCFNumberFormatterCurrencyStyle to format
the amount string and display it in the label"
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group