0
let textView = UITextView()

When the apps run and create an UITextView for the first time, it took about 2 seconds on simulator,same problem on device.But it does not has this problem after that, it only happen when the apps first run. Why and how to fix it?

Lee
  • 850
  • 11
  • 23
ZClyde
  • 1
  • 2
    How have you determined that that particular line is taking two seconds? – Will M. Feb 22 '16 at 15:25
  • By breakpoint,not exactly 2 seconds,but cost much time to pass this line. – ZClyde Feb 28 '16 at 03:20
  • Might be related: https://stackoverflow.com/questions/34199956/slow-load-time-for-custom-uiview-with-uitextview-property-in-swift – Pang Jul 12 '17 at 08:01

1 Answers1

0

Is the view that contain textView is the first screen?

If yes, is it possible that you have an empty launch screen that make you thought it was slow?

Lee
  • 850
  • 11
  • 23