Tencent / QMUI_iOS

QMUI iOS——致力于提高项目 UI 开发效率的解决方案
http://qmuiteam.com/ios
Other
7.05k stars 1.37k forks source link

UIButton+QMUI.h qmui_setTitleAttributes 无效 #1381

Open haoguangxie opened 2 years ago

haoguangxie commented 2 years ago

Bug 表现 1、设置了多个state的attributes, qbt_titleAttributes中有保存到该attributes 2、多个state的title是一样的, qbt_syncTitleByStates 方法中只会调用 Normal 状态下的 setAttributedTitle, 而其他状态下的attributes实际没有生效

预期的表现 同一个title可以有不同的状态,应用不同的attributes

修改建议 ` // 如果 normal 用了 attributedTitle,那么其他的 state 都必须用 attributedTitle,否则就无法展示出来