The problem is that a Button which has text-decoration has its setAttributedTitleForState method called. When we change the text and call only the setTitleForState method nothing changes. We have to call the setAttributedTitleForState method as well.
The problem is that a Button which has text-decoration has its
setAttributedTitleForStatemethod called. When we change the text and call only thesetTitleForStatemethod nothing changes. We have to call thesetAttributedTitleForStatemethod as well.