是否可以在不使用圖像的情況下通過文字創建按鈕?如何通過UIButton創建一個罷工?
我知道這是可能給它做一個UILabel
NSMutableAttributedString *attributeString = [[NSMutableAttributedString alloc] initWithString:@"Your String here"];
[attributeString addAttribute:NSStrikethroughStyleAttributeName
value:@2
range:NSMakeRange(0, [attributeString length])];
[' - [UIButton的setAttributedTitle:forState:]'](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIButton_Class /index.html#//apple_ref/occ/instm/UIButton/setAttributedTitle:forState :) –