Latest 1.0.0
Homepage https://github.com/pikacode/TypewriterView
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit, Foundation
Authors

Email´╝Ü[email protected]

A simple but usefull typewriter view subclass of UITextView.

Screenshot

Installation

use_frameworks!
target 'YourTargetName' do
  pod 'TypewriterView'
end

Usage

Init
let typewriterView = TypewriterView(frame: frame)
Write
/* Write */
typewriterView.write("some content")
typewriterView.write("some content", speed: 0.05)

/* Cursor Blink */
typewriterView.cursorBlink()
typewriterView.cursorBlink("I", speed: 0.02, repeats: 5)

/* Pause/Resume */
typewriterView.pause()
typewriterView.resume()

/* Unod */
typewriterView.undo(15)
typewriterView.undo(20, speed: 0.02)
Clear/Stop
/* Clear */
//clear text, but will not stop writing
typewriterView.clear()

/* Stop */
//stop writing right now, and discard unwrite contents
typewriterView.stop()

/* Discard Unwrite Contents */
//discard unwrite contents, but keeps writing current text
typewriterView.discardUnwriteContents()
Completion Block
/* Completion Block */
typewriterView.completionBlock = {
    doSomeThing()
}
Status
/* Status */
typewriterView.isPausing
typewriterView.isFinished

Latest podspec

{
    "name": "TypewriterView",
    "version": "1.0.0",
    "summary": "A simple but usefull typewriter view subclass of UITextView.",
    "homepage": "https://github.com/pikacode/TypewriterView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "pikacode": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/pikacode/TypewriterView.git",
        "tag": "1.0.0"
    },
    "source_files": "TypewriterView/*.{swift}",
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "requires_arc": true,
    "swift_version": "3.3"
}

Pin It on Pinterest

Share This