Swift is well known for its very diverse approach to access control, and you want to make sure that people have the proper amount of access to functionality in your framework. It's important to understand the reasons why you want to give control of certain features to the developer using your framework. This video covers those reasons, as well as how to leverage the access control levels in Swift for your users.
- [Instructor] Let's talk about access control…in Swift frameworks.…If you've done iOS application development,…you've likely encountered access control to a certain degree…but it's not always the most crucial thing…when you're worried about application development.…It is way more important to worry about access control…when you're developing a reusable framework.…Here's our use case for here.…You notice that in our CameraViewController,…we've put in a lot of code…that has to do with capture sessions, input, output.…Honestly, there's a better place for that…than inside a class of type UIViewController.…So we can abstract some of that logic away…from our CameraViewController…and make sure that the developer who's using this framework…doesn't necessarily have access to it…because they don't need it.…
Furthermore, we can talk about how to provide…the right kinds of access…to our stored properties and functions…that we do want developer to have access to.…We're going to start by deleting a lot of code…in our UIViewController.…
Along the way, he explains the differences and nuances between writing code for an application and for a reusable framework, as well as some of the fundamentals of AVFoundation, one of the core camera frameworks in iOS. David also shows how to refactor your code, understand Swift access control, develop an interface, and handle memory leaks, so your framework is ready to share with other developers.
- Creating your first build
- Making the camera work
- Creating a framework delegate
- Adding media
- Capturing images
- Correcting orientation
- Versioning and tagging releases in Git
Skill Level Intermediate
Learning Server-Side Swift with Vaporwith Ron Buencamino1h 30m Intermediate
Swift 4: Protocol-Oriented Programmingwith Károly Nyisztor1h 44m Intermediate
1. Let's Make It Work
2. Let's Keep It Clean
3. Putting It All Together
4. Track It
Tagging releases in Git2m 36s
Next steps1m 47s
- 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.