- [Instructor] Now that we've set up our UI…to handle the tap of the shutter button,…we need to tell AV Foundation that we need a still image.…In order to do that,…we need to go to out camera.swift object…inside of our reusable framework.…Scroll down to where you see var video output.…You'll notice that to this point,…all we've added onto our inputs and outputs…for AV capture session,…is an AV capture video data output for our output.…However, when we capture a still image,…we need to also have a photo output.…Underneath var video output, type var photo output,…and you'll make this of type AV capture photo output,…and construct it with parentheses.…
Now that we've done this,…you'll notice that our update function is a little stale…and it could benefit from some refactoring.…The input and the output that we've specified…aren't the only ones we're getting rid of.…Let's go ahead and scroll down to…underneath the function for capture still image.…And a function called recycle device IO.…We'll type it here: func recycle device IO,…
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
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.