more about NSAttributedString and truncation in iOS 6
more about NSAttributedString and truncation in iOS 6
- Subject: more about NSAttributedString and truncation in iOS 6
- From: Matt Neuburg <email@hidden>
- Date: Sat, 26 Jan 2013 10:47:43 -0800
Expanding even more on my previous point, take a look at this screen shot:
http://imageshack.us/photo/my-images/39/truncationtest.png/
The first rectangle is a self-drawing NSAttributedString. It draws and truncates its first line only.
The second rectangle is a UILabel drawing the very same attributed string. Oddly, it is multiline and truncates the last line. I suppose this is because it's trying to imitate what it used to do before attributed strings came along on iOS. But...
The third rectangle is a UILabel too, and it has given up on that whole multiline thing and goes back to the NSAttributedString way of doing it - the second paragraph is shown only in its first line, which is truncated. I suppose this is because the UILabel just can't cope with having two paragraphs styled in two different ways.
Thus we get a threeway inconsistency. UILabel is inconsistent in the first instance with how an attributed string draws itself, but in the second instance UILabel is inconsistent with itself.
m.
--
matt neuburg, phd = email@hidden, http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Programming iOS 5! http://shop.oreilly.com/product/0636920023562.do
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden