Latest 0.0.1
Homepage https://github.com/DiegoCaridei/DCWriteAnimationForSwift
License MIT
Platforms ios 10.0
Authors

DCWriteAnimationForSwift
DCWriteAnimation DCWriterAnimation allow you to create a beautiful effect like this:

DCWriteAnimation

RequirementsUsageInstallationContributionContactLicense

Requirements

  • iOS 8.0+
  • Xcode 8.0+
  • Swift 3.0+

Usage

Reaction

A DCWriteAnimation object is a simple CAShapeLayer

class ViewController: UIViewController {
@IBOutlet weak var containerView: UIView!
var write = DCWriteAnimation()
override func viewDidLoad() {
super.viewDidLoad()
containerView.layer.addSublayer(write)
write.writeAnimation(word: "Hello World")
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
self.write.clear()
}
}
}

Also you can setting these property:

var sizeFont : CGFloat = 30
var fontName: String = "Avenir-Heavy"
var color : UIColor = .black
var durationAnimation : Int = 1
var fillColorAnimation: CGColor = UIColor.clear.cgColor
var lineWidthAnimation: CGFloat = 5
var positionAnimation = CGPoint(x: 10, y: 10)

Or use the costructor:

init(sizeFont:CGFloat,fontName:String,colorText:UIColor,durationAnimation:Int,fillColorAnimation: CGColor,lineWidthAnimation:CGFloat,positionAnimation:CGPoint)

Installation

CocoaPods

Install CocoaPods if not already available:

$ [sudo] gem install cocoapods
$ pod setup

Go to the directory of your Xcode project, and Create and Edit your Podfile and add DCWrite:

$ cd /path/to/MyProject
$ touch Podfile
$ edit Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'

use_frameworks!
pod 'DCWriteAnimationForSwift'

Install into your project:

$ pod install

Open your project in Xcode from the .xcworkspace file (not the usual project file):

$ open MyProject.xcworkspace

You can now import DCWriteAnimation framework into your files.

Manually

Download the project and copy the DCWrite folder into your project to use it in.

Contribution

Contributions are welcome .

Contact

Diego Caridei • [email protected]

License (MIT)

Copyright (c) 2017-present – Diego Caridei

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Latest podspec

{
    "name": "DCWriteAnimationForSwift",
    "version": "0.0.1",
    "summary": "Draw text in swift",
    "description": "DCWriterAnimation allow you to create draw text animation effect in easy way",
    "homepage": "https://github.com/DiegoCaridei/DCWriteAnimationForSwift",
    "screenshots": "http://www.iprog.it/blog/wp-content/uploads/2017/03/687474703a2f2f646965676f636172696465692e616c74657276697374612e6f72672f626c6f672f77702d636f6e74656e742f75706c6f6164732f323031342f30352f4443577269746572416e696d6174696f6e2e676966.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "DiegoCaridei": "[email protected]"
    },
    "social_media_url": "https://twitter.com/flexkid1",
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/DiegoCaridei/DCWriteAnimationForSwift.git",
        "commit": "d65c7c8c6ced22ab8a72ed3ea40a0de7d367fc5b"
    },
    "source_files": "DCWrite",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This