Adding fraction digits settings for iOS 7.
For better practice and regarding to 64-bit in iOS 7, change type int to NSInteger.