Instruments provides all the tools to detect issues and bottlenecks in your apps.
- [Instructor] Now let's try to fix the issues…highlighted by the time profiler.…First, we'll inspect the table view…cell for row at index path delegate method.…Let's switch back to Xcode.…As you can see, at line 55,…a date formatter add gets instantiated…for every table view cell.…The date formatter uses the same date style…to format the dates.…So, we could expect the initialization…and create a lazy instance variable…that only gets initialized once,…and not for every table view cell.…
So, I'm going to create a lazy date formatter properly.…The lazy keyboard guarantees that only one instance…is created.…Next, I supply a closure that runs when the date…formatter instance is initialized.…
And I also set its style to medium.…And finally, we return the formatter.…From now on, we're gonna use the date formatter…in the table view cell for row at index path.…Let's remove this code…and instead we'll use the lazy property.…Now, let's see what can we do…with the generated days method.…
It is called from the view did load method,…
- Unified Modeling Language (UML)
- Use case, class, and sequence diagrams
- App state preservation and restoration
- Fundamental architectural design patterns
- Model-view-controller (MVC) and model-view-presenter (MVP)
- Implementing one-way binding
- App stage changes
- Building responsive apps
- SOLID principles
- Exchanging information between apps
- Optimizing your apps to avoid excessive CPU usage
Skill Level Intermediate
What you should know1m 5s
1. UML Basics
2. The iOS App Life Cycle
3. Fundamental Architectural Design Patterns
4. App State Transitions
5. Building Responsive Apps
6. The SOLID Principles
7. Communication between Apps
8. Efficiency and Performance
Optimizing for performance3m 19s
Next steps1m 14s
- 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.