Skip to content

pedrosakey/ObjC2Swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GifMaker Swift 5

Platform iOS

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

Overview

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.

In progress

Testing

App styling

Detail view

Persists Gifs

  • Add Detail View Controller
  • Share gif

Add Gif to Saved Gifs

  • Add Caption improved
  • Fix Creating the same outpath for differents videos
  • Add Gif to Saved Gifs

Crop video

  • Fix problem with outpath

Crop Video

Enable Video Trimming

  • 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 .
  1. Create a Gif without caption for showing in editor.
  2. User can or not add caption in GifEditorController
  3. Show the gif with caption overlay in GifPreviewController
  4. 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.

Apple Developer Documentation

Create an Action Sheet

  • 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

Action Sheet

Share the GIF

  • Add the Gif to an activity items array
  • Present an Activity View Controller

Share gif

warning is not sharing gif file properly with all apps. For example gmail app

Add caption

  • 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 Caption

Convert a new recordly video into a gift

Present a camera

  • 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

Gift conversion

  • 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

Convert video into Gif

License

MIT

About

Udacity course updated for Swift5

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages