- We've done a lot of great work so far…to make sure that we get…a still image out of our camera object.…Now let's finally take that image,…return it out of our framework,…and add it to our sample application.…First, we know that we have…a handle on our image here…as it's returned from our camera object.…We need to make sure that…we're adding a delegate function…to return that out of our view controller…and back to our sample application.…To do this, go ahead and scroll…to the top of cameraviewcontroller.swift…inside your reusable framework.…Underneath the declaration for cancelButtonTapped,…add another function.…
We'll call this one "stillImageCaptured"…and we'll pass in the controller…of type CameriaViewController…and we'll also include an image…of type UIImage.…Scroll back down to your extension,…where you're handling functions from CameraDelegate…and go inside the function for stillImageCaptured.…Delete your print statement…and if you had a break point set here previously,…make sure that get rid of that as well.…
Author
Released
11/21/2017Along 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
- Refactoring
- Creating a framework delegate
- Adding media
- Capturing images
- Correcting orientation
- Versioning and tagging releases in Git
Skill Level Intermediate
Duration
Views
-
Introduction
-
Welcome44s
-
What you should know1m 59s
-
Using the exercise files2m 52s
-
-
1. Let's Make It Work
-
Setting your goal2m 11s
-
Create your first build3m 32s
-
Make the camera work: Part 15m 21s
-
Make the camera work: Part 24m 11s
-
-
2. Let's Keep It Clean
-
Refactoring your camera8m 7s
-
Handling rotation4m 45s
-
3. Putting It All Together
-
Capturing a still image6m 57s
-
Normalizing your image data2m 47s
-
Checking for leaks4m 37s
-
4. Track It
-
Tagging releases in Git2m 36s
-
Conclusion
-
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.
CancelTake 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.
Share this video
Embed this video
Video: Refactoring your sample application