{"id":19805621,"url":"https://github.com/remirobert/textdrawer","last_synced_at":"2025-05-01T06:31:23.016Z","repository":{"id":56924131,"uuid":"39207551","full_name":"remirobert/TextDrawer","owner":"remirobert","description":"TextDrawer, is a UIView allows you to add text, with gesture, on UIView, or UIImage","archived":false,"fork":false,"pushed_at":"2016-04-08T12:26:39.000Z","size":402,"stargazers_count":106,"open_issues_count":3,"forks_count":21,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-31T15:58:42.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/remirobert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-16T16:16:56.000Z","updated_at":"2024-04-18T00:04:02.000Z","dependencies_parsed_at":"2022-08-21T05:20:49.008Z","dependency_job_id":null,"html_url":"https://github.com/remirobert/TextDrawer","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FTextDrawer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FTextDrawer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FTextDrawer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FTextDrawer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remirobert","download_url":"https://codeload.github.com/remirobert/TextDrawer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224246064,"owners_count":17279649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T09:04:41.255Z","updated_at":"2024-11-12T09:04:41.902Z","avatar_url":"https://github.com/remirobert.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TextDrawer\n[![Swift 2.0](https://img.shields.io/badge/Swift-2.0-orange.svg?style=flat)](https://developer.apple.com/swift/)\n![Version Status](http://img.shields.io/cocoapods/v/TextDrawer.png) ![license MIT](http://img.shields.io/badge/license-MIT-orange.png) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n*TextDrawer, is a UIView allows you to add text, with gesture, on UIView, or UIImage.*\n\n## About\n\nAnnotating Images\n\nTextDrawer is the easiest way to add text to `UIImage` with a touch interface. You can add text, with resizable, move, and rotate gesture with `UIGestureRecognizer`.\nWith TextDrawer, it's easily save notes on top of a `UIImage`.\n\n![ScreenShot](http://share.gifyoutube.com/vJAB4g.gif)\n\n## Requirements\n\n* iOS 8\n* Swift 1.2\n\n## Installation\n\n#### [CocoaPods](http://cocoapods.org)\n\n````ruby\nuse_frameworks!\npod 'TextDrawer', '~\u003e 1.0.6'\n````\n\n#### [Carthage](https://github.com/Carthage/Carthage)\n\n````bash\ngithub \"remirobert/TextDrawer\"\n````\n\n#### Manually\n\n1. Clone this repo and add the `TextDrawer/TextDrawer.xcodeproj` to your project\n2. Select your project app target \"Build Phases\" tab\n3. Add the `TextDrawer.framework` to the \"Link Binary With Libraries\"  \n4. Create a new build phase of type \"Copy Files\" and set the \"Destination\" to \"Frameworks\"\n5. Add the `TextDrawer.framework` and check \"Code Sign On Copy\"\n\nFor an example, see the demo project included in this repo.\nTo run the example project, clone the repo, and run `pod install` from the Example directory.\n\n## Getting Started\n\n````swift\nimport TextDrawer\n````\n\n##### Design\n\nThis framework is composed on different parts.\nThe first one is the `TextEditView`. It allows you to edit the text. it is composed of a `UITextView`, and manage the keyboard notifications.\nNext, `DrawTextView`, is a `UIView`, showing your text in the view.\nAnd, `TextDrawer`, it contains the above views. It allows to configure some parameter (like font, size, color, etc ...). All the gestures are managed here.\n\n## Usage\nAdd an instance of `TextDrawer` above an `UIImageView`, or an another `UIView` (with an optional clear background). Adjust the size and layout of `TextDrawer` however you'd like. `TextDrawer` uses, `Masonry` to manage auto-layout. You don't have anything to do, after that. `TextDrawer` will handle, the gesture for you. See this screen bellow.\n\n\u003cimg width=\"989\" alt=\"screen shot 2015-07-21 at 14 37 45\" src=\"https://cloud.githubusercontent.com/assets/3276768/8800821/398a416a-2fb6-11e5-9029-52df374d45d7.png\"\u003e\n\nRender the `TextDrawer` to an `UIImage` outup:\n\n```Swift\n// draw the TextDrawer view on an UIImageView\nlet image = drawTextView.renderTextOnView(imageViewBackground)\n\n// render the TextDrawer View to UIImage\nlet image = drawTextView.render()\n\n// render the TextDrawer View directly on an UIImage\nlet image = drawTextView.renderTextOnImage(image)\n```\n\nClear the `TextDrawer` view:\n\n```Swift\nself.textDrawer.clearText()\nself.textDrawer.resetTransformation()\n```\n\n`TextDrawer` configuration:\n\n```Swift\ndrawTextView.font = UIFont.systemFontOfSize(34)\ndrawTextView.textColor = UIColor.whiteColor()\ndrawTextView.textAlignement = NSTextAlignment.Center\ndrawTextView.textBackgroundColor = UIColor.redColor()\ndrawTextView.text = \"test input\"\ndrawTextView.textSize = 40\n```\n\n## Contributors\n\n* [Rémi ROBERT](https://github.com/remirobert), creator. ( ﾟヮﾟ)\n\n## License\n\n`TextDrawer` is released under an [MIT License][mitLink]. See `LICENSE` for details.\n\n\u003e**Copyright \u0026copy; 2015 Rémi ROBERT.**\n\n*Please provide attribution, it is greatly appreciated.*\n\n[mitLink]:http://opensource.org/licenses/MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremirobert%2Ftextdrawer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremirobert%2Ftextdrawer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremirobert%2Ftextdrawer/lists"}