iOS 仿微信灵活添加标签
原作者的github 地址 喜欢的点赞
https://github.com/DreamFlyingCow/TTTags
效果如下,iOS 13 访问私有属性 会崩溃,自己修改一下即可
TTTagView.m 文件修改如下
我的备份:https://github.com/AlexanderYeah/TTTagDemo
// [_tfInput setValue:_inputPlaceHolderTextColor forKeyPath:@"_placeholderLabel.textColor"];
NSMutableAttributedString *placeholderString = [[NSMutableAttributedString alloc] initWithString:@"" attributes:@{NSForegroundColorAttributeName : _inputPlaceHolderTextColor}];
_tfInput.attributedPlaceholder = placeholderString;