开发者

UILabel to render partial character using clip

开发者 https://www.devze.com 2023-02-11 10:38 出处:网络
I want a UILabel to render a partial character by setting the lineBreakMode to clip. But it is clipping the entire character. Is there a different 开发者_StackOverflow社区way to clip a word so that on

I want a UILabel to render a partial character by setting the lineBreakMode to clip. But it is clipping the entire character. Is there a different 开发者_StackOverflow社区way to clip a word so that only partial character is displayed?

Lets say I have a string like:

"Hello Word" and that string is in a myLabel with a width that only fits the 5 characters and part of the "W" I want it still to render part of the "W" and not drop it from the render.


I suspect you'd have to render the string into an image and clip that.

0

精彩评论

暂无评论...
验证码 换一张
取 消