blob: b5213798118b0e5ab41fb5e1e089eb5558d71b51 [file] [log] [blame]
{
"name": "Reditor",
"version": "1.0.3",
"license": "MIT",
"summary": "A Reditor is simple photo editor.",
"homepage": "https://www.remoty.com",
"social_media_url": "https://www.remoty.com",
"description": "# Reditor\n - Reditor allow to annotate image by drawing & place text\n\n ![Screenshot](IMG_01.PNG)\n ![Screenshot](IMG_02.PNG)\n\n # Getting Started\n\n ## Installation with CocoaPods\n\n CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. It has over 54 thousand libraries and is used in over 3 million apps. CocoaPods can help you scale your projects elegantly.\n\n\n 1. Using the default Ruby install can require you to use sudo when installing gems.\n ```\n $ sudo gem install cocoapods\n ```\n\n 2. CocoaPods provides a pod init command to create a Podfile with smart defaults. You should use it.\n ```\n $ cd <#Your project path#>\n ```\n ```\n $ pod init\n ```\n\n 3. Then add Reditor to pod file\n ```\n platform :ios, '10.0'\n use_frameworks!\n\n target 'MyApp' do\n pod 'Reditor'\n end\n ```\n\n 4. Run pod install command\n ```\n $ pod install\n ```\n\n # Usage\n\n ## Init & setup\n - NOTE: To handle better appearance effect it recommended to pre-define view container that will hold the reditor view\n\n 1. Create a UIView in storyboard and connect it to \"@IBOutlet\" in your own controller.\n - (You also can do this in code. Create a UIView with frame size of \"self.bounds\" and add to subview with alpha zero).\n 2. Reditor initiation return UIViewController that should be added as child view controller to your own controller.\n 3. Then give frame size to reditorVC's view of a predefined container.\n 4. Add reditorVC's view to predefined container subview.\n 5. Add alpha animation to the predefined container to get a fade in effect.\n 6. Finally, add protocol & methods.\n\n ```\n class ViewController: UIViewController, ReditorProtocol {\n\n\n @IBOutlet weak var reditorContainerView: UIView!\n\n\n func presentReditorVC(image: UIImage) {\n\n if let reditorVC = Reditor.setupRedior(withImage: image, listener: self) {\n\n self.addChildViewController(reditorVC)\n\n /** Container */\n reditorContainerView.alpha = 0.0\n\n /** Reditor config */\n reditorVC.view.frame = self.reditorContainerView.bounds\n reditorContainerView.addSubview(reditorVC.view)\n\n /** Appearance */\n UIView.animate(withDuration: 0.33) {\n self.reditorContainerView.alpha = 1.0\n }\n }else{\n print(\"Ooops!\nSomething went wrong\")\n }\n }\n\n\n func reditorDidFinishedDrawing(image: UIImage) {\n UIView.animate(withDuration: 0.33, animations: {\n self.reditorContainerView.alpha = 0.0\n }, completion: { _ in\n for subview in self.reditorContainerView.subviews {\n subview.removeFromSuperview()\n }\n })\n }\n\n func reditorDidCanceledDrawing() {\n UIView.animate(withDuration: 0.33, animations: {\n self.reditorContainerView.alpha = 0.0\n }, completion: { _ in\n for subview in self.reditorContainerView.subviews {\n subview.removeFromSuperview()\n }\n })\n }\n\n }\n ```",
"authors": {
"iOS Ninja": "igor@remoty.com"
},
"platforms": {
"ios": "10.0"
},
"swift_version": "4.0",
"requires_arc": true,
"source": {
"git": "https://iosninja@dev.azure.com/remoty-visual/Remoty/_git/Reditor-iOS",
"tag": "1.0.3"
},
"source_files": "Reditor/**/*.{swift}",
"resources": "Reditor/**/*.{png,jpeg,jpg,storyboard,xib,xcassets}"
}