CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

TypewriterView 1.0.0

TypewriterView 1.0.0

Maintained by pikacode.



  • By
  • pikacode

Email:[email protected]

TypewriterView

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