2
最後一行下面的解決方案正常工作的結束位置僅適合在一行確定的UILabel
cell.accessoryTitleLabel.text = data.title
cell.accessoryTitleLabel.sizeToFit()
cell.discountIcon.frame.origin.x = cell.accessoryTitleLabel.frame.maxX + 7
cell.discountIcon.hidden = discount == 0
選中此http://stackoverflow.com/questions/19318421/how-to-embed-small-icon-in-uilabel/42721312#42721312 –
感謝大家。我可以更改附件圖像的alpha參數嗎? –