I am drawing a string with a NSLayoutManager by doing:
[layoutManager drawGlyphsForGlyphRange:glyphRange atPoint:NSMakePoint( [self bounds].origin.x,[self bounds].origin.y )];
What I would like is if the string I am drawing goes beyond the last visible line, is for the string to draw a truncated form of itself with an elipses at the last visible part of the string.
As near as I can tell, this is what the NSString drawing option NSStringDrawingTruncatesLastVisibleLine will do.
The paragraph style NSLineBreakByTruncatingTail comes close, but I have a single string that can be drawn over multiple lines and still be visible. The NSLineBreakByTruncatingTail style restrict my drawing to just a single line which isn't enough.
Anyone tried to emulate NSStringDrawingTruncatesLastVisibleLine with NSLayoutManager drawing?
Is there any sample code out there demonstrating the technique? _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com