TYAttributedLabel icon indicating copy to clipboard operation
TYAttributedLabel copied to clipboard

设置占位图, 真正的图片下载后, 如何更新label大小

Open iOSleep opened this issue 7 years ago • 2 comments

TYImageStorage *imgStorage = [[TYImageStorage alloc] init];
imgStorage.placeholdImageName = imgName;
imgStorage.size = [UIImage imageNamed:imgStorage.placeholdImageName].size;
imgStorage.imageAlignment = TYImageAlignmentFill;
imgStorage.imageURL = url;
[label appendTextStorage:imgStorage];

label 使用的还是这里设置的大小, 如何更新?

iOSleep avatar Jan 12 '18 12:01 iOSleep

@12207480 大佬能回答一下么?

iOSleep avatar Jun 08 '18 09:06 iOSleep

获取到imgStorage 设置size 重新刷新display

12207480 avatar Jun 13 '18 03:06 12207480