Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Most efficient way of repeatedly drawing attributed text to view
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="james_hartt" data-source="post: 1075323" data-attributes="member: 163594"><p>Sorry for being a newbie, Please help!</p><p></p><p>I am creating a fairly simple app that layers on iTunes, using its Apple Events stuff. That side is going well...</p><p></p><p>My Question is, my app, because it uses the strings of the currently playing Artists and Song Name etc. this could change rapidly in my case (less than every second, updates of the playing track strings can occur this fast) I was wondering what the most efficient way to draw to the strings with font attributes, background and also alignment...? I am looking to save some time too! </p><p></p><p>I tried passing NSAttributedStrings to TextFields (Set out as Labels in IB); fine for initial uploading of string, but with the constant updating, it obviously does not really enjoy it. I tried just using:</p><p></p><p>[trackDescriptionLabel setStringValue:description];</p><p></p><p>For example, but it looses all the formatting from the initial NSAttributedString. Is there anyway to lock these atributes and just change the text that is displayed?</p><p></p><p>I have tried implementing NSTextView classes also, however they do not seem to offer both, font, background color changes and alignment... I could be wrong! (there are a few deprecated methods and properties for example)</p><p></p><p>Any reply would be appreciated, I know how first posts can drown!!</p><p></p><p>Kindest Regards</p><p></p><p>James Hartt</p></blockquote><p></p>
[QUOTE="james_hartt, post: 1075323, member: 163594"] Sorry for being a newbie, Please help! I am creating a fairly simple app that layers on iTunes, using its Apple Events stuff. That side is going well... My Question is, my app, because it uses the strings of the currently playing Artists and Song Name etc. this could change rapidly in my case (less than every second, updates of the playing track strings can occur this fast) I was wondering what the most efficient way to draw to the strings with font attributes, background and also alignment...? I am looking to save some time too! I tried passing NSAttributedStrings to TextFields (Set out as Labels in IB); fine for initial uploading of string, but with the constant updating, it obviously does not really enjoy it. I tried just using: [trackDescriptionLabel setStringValue:description]; For example, but it looses all the formatting from the initial NSAttributedString. Is there anyway to lock these atributes and just change the text that is displayed? I have tried implementing NSTextView classes also, however they do not seem to offer both, font, background color changes and alignment... I could be wrong! (there are a few deprecated methods and properties for example) Any reply would be appreciated, I know how first posts can drown!! Kindest Regards James Hartt [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Most efficient way of repeatedly drawing attributed text to view
Top