LoginSignup
9
8

More than 5 years have passed since last update.

UITextViewのカーソルの色(tintColor)を編集中に変える方法

Last updated at Posted at 2016-02-12
textView.tintColor = .whiteColor()

UIView.beginAnimations(nil, context: nil)
UIView.setAnimationDuration(0)
UIView.setAnimationDelay(0)
UIView.setAnimationCurve(.Linear)

textView.resignFirstResponder()
textView.becomeFirstResponder()

UIView.commitAnimations()

カーソルを一度外して付け直すと反映されるらしい。
アニメーションをオフにしないと、キーボードが上がり下がりする。

9
8
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
9
8