LoginSignup
1
2

More than 3 years have passed since last update.

【Swift】ノベルゲームっぽく文字を表示するライブラリ

Last updated at Posted at 2020-05-31

ノベルゲームを作りたかった

Swiftでノベルゲームを作りたかったのですが、文字をそれっぽく表示するライブラリだけは発見できました。

他にも何かいい情報あれば教えてください!

cocoapodsでこれをインストール

pod 'SRGNovelGameTexts'

あとはこのコードの表示位置やテキストを変えれば完成です。

// テキスト出力用のViewを初期化
let novelGameText = SRGNovelGameTexts()
novelGameText.frame = CGRect(x: 100,y: 100,width: 100,height: 100)
novelGameText.textColor = UIColor.black
self.view.addSubview(novelGameText)

// 出力したいテキストをセット
novelGameText.setText("こーら!まだ起きないの?")

// 演出を再生開始
novelGameText.startDisplayingText()
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2