An example of migration of an app written in objective C to swift. This is part of the course Objective-C for Swift Developers in Udacity working with Swift 5
GifMaker is an app that lets users create simple GIF animations from their iOS device. It is used as an example throughout Udacity's Objective-C for Swift Developers course.
- Add Detail View Controller
- Share gif
- Add Caption improved
- Fix Creating the same outpath for differents videos
- Add Gif to Saved Gifs
- Fix problem with outpath
- Start trim selection and End Trim selection. If we don't select values are nil
// MARK: - UIViewController: UIImagePickerControllerDelegate
// If video was trimmed
if let startTrim = info[UIImagePickerController.InfoKey.init(rawValue: "_UIImagePickerControllerVideoEditingStart")] as! NSNumber?,
let endTrim = info[UIImagePickerController.InfoKey.init(rawValue: "_UIImagePickerControllerVideoEditingEnd")] as! NSNumber? {
- Gif refactoring.
- Gif class is now a wrapper class of Regift class. This means that we can create Gif directly with this class.
- App workflow
- We add a new textField to GifPreviewController .
- Create a Gif without caption for showing in editor.
- User can or not add caption in GifEditorController
- Show the gif with caption overlay in GifPreviewController
- When user CREATE or SHARE new gif will be created integrating caption.
- Edit saved videos
- Can't edit saved videos with image UIImagePickerController
The default camera interface supports editing of previously-saved movies. Editing involves trimming from the start or end of the movie, then saving the trimmed movie. To display an interface dedicated to movie editing, rather than one that also supports recording new movies, use the UIVideoEditorController class instead of this one. See UIVideoEditorController.
- We add an action sheet as a part of View Controller TODO Do the same as Generic and paste in snippets library
- Add launch method to photolibrary. Is not included in this section
- Add the Gif to an activity items array
- Present an Activity View Controller
warning is not sharing gif file properly with all apps. For example gmail app
- Rewrite the Gif class
- UITextFieldDelegate Methods
- keyboard notifications and adjustment methods could be implemented in Swift.
- Add a caption to the animated GIF
- Show add caption in GifPreview Controller
- Add controllers
- Compare code in objC version and swift version. Find by elements.
- Swift elements in swift 3 deprecreated. We must update
- I had to add Privacy Photo Additions Usage description
-
Using Gifs in UIImageview we need an extension we are going to use this one: SwiftGif
-
Implement Regif methods Conversion video to Gif Regif
-
Display the gif in gif editor
MIT