问题
I was wondering if there was a simple way to "bounce" or scroll an NSTextField
with text thats too long to display.
For Example:
-----------------------------
<-- scroll | This is a rather large pi | ..ece of text!
-----------------------------
So in this example, the text would scroll to the end, showing the rest of the message, then back to the beginning where it will rest; basically giving the user a peak at all of the text.
-----------------------------
This is a ra.. | ther large piece of text! | --> then scroll back to beginning.
-----------------------------
The same animation can also be found on the iPhone when in a call, the Persons name will scroll in this manner if it is too large to fit on the display.
来源:https://stackoverflow.com/questions/6290262/nstextfield-bounce-truncated-text-instead-of-wrapping