K
K
Klaxons2019-05-16 22:31:58
iOS
Klaxons, 2019-05-16 22:31:58

How to speed up text rendering in UITextView?

There is an iOS application consisting only of UITextView, data from the computer comes to it via a wire (either PeerTalk) (the serial port to which the microcontroller is connected is launched and transferred to the iOS device). The speed of the com port is 115200 baud, the speed of usb iOS is also high, if you display the results that arrive on iOS in the console (print), then everything is displayed synchronously (I can see the rendering speed on the computer and in the console for iOS). as soon as I start drawing in uitextview as
`textView.textStorage.append(NSAttributedString(string: string as String, attributes: attributes))`
then the data has already been displayed and transferred on the computer, and on iOS it is still added, and with each new portion of data it is drawn getting slower and slower, and then it crashes altogether

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
briahas, 2019-05-24
@briahas

In my opinion, here we must start looking from the end - Why does it crash?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question