Currency Formatting in Swift with NumberFormatter and NSAttributedString

Опубликовано: 20 Октябрь 2024
на канале: Swift Arcade
2,763
48

#Swift / #iOS / #NumberFormatter / #NSAttributedString

In this video we look at two ways to format currencies as Strings.

1. Using NumberFormatter.
2. Using NSAttributedStrings.

0:00 What's the problem?
0:17 What's the solution?
3:00 Why Decimal?
4:12 NumberFormatter solution
5:55 NSAttributedString solution
8:20 modf
9:45 What is a tuple?
13:20 What is an NSAttributedString?
15:40 Summary

Show notes:

https://github.com/jrasmusson/swift-a...

Level Up Courses

Data Structures & Algorithms
https://www.udemy.com/course/the-swif...

Level Up AutoLayout
https://www.udemy.com/course/level-up...

Level Up in Swift
https://www.udemy.com/course/level-up...

Source code
https://github.com/jrasmusson/swift-a...

Twitter
@jrasmusson