Number formatters exist to format numbers in a variety of ways. This video shows how to apply a formatter object to an existing user interface object for quality formatting.
- [Instructor] Let's say you're working with text fields…or labels, and you want to format the number…as maybe a date or a float value,…or some other format that you'd like to use.…Maybe you're going to display currency…in your application, and you want to make sure…that it's formatted properly and localized.…So, to do that, let's drag out a few labels onto the screen.…Let's say the top label is going to represent a date.…And let's just expand it the whole width…of the window right there.…
And then the bottom label is going to represent currency,…and that's going to be a float value.…So, date at the top, currency at the bottom.…Let's option click AppDelegate.swift,…and hook these up to our code.…So, I'll hide the side areas here.…And then I'm just going to right click…and drag as usual, from the top label,…right between lines 12 and 13, call this dateLabel,…hit connect, same thing for the bottom label.…Right click and drag in, call this currency label,…hit connect.…
Now, we need to create a date,…and we need to create a float for the currency.…
- Installing your development tools
- Working with Xcode and the MVC pattern
- Creating basic interactions
- Creating delegate classes
- Building a user interface
- Laying out the UI
- Working with data and table views
- Binding data objects to the UI
- Debugging your app
- Distributing the app
Skill Level Beginner
1. Get Started
2. Core Cocoa Skills
4. Create User Interfaces
5. Arrange User Interfaces
6. Use Data Controls
7. Debug and Troubleshoot
8. Distribute an Application
9. Finishing Touches
Create full screen apps1m 51s
Next steps1m 21s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.