<分区>
<分区>
如何在 UIButton 的标题中输入这样的引号 << >>
.我需要带有 Helvetica-Neue 的 iOS 5。默认我有 " "
报价
最佳答案
这些字符的 unicode 信息是:
»
RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
Unicode: U+00BB, UTF-8: C2 BB
«
LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
Unicode: U+00AB, UTF-8: C2 AB
因此,要将其中一个放入字符串中,请执行以下操作:
NSString* rightPointing = [NSString stringWithUTF8String:"\xC2\xBB"];
NSString* leftPointing = [NSString stringWithUTF8String:"\xC2\xAB"];
这看起来有点麻烦,但是你当然可以将这些字符串与其他字符串组合起来:
NSString* buttonLabel = [NSString stringWithFormat:@"%@%@%@", leftPointing, @"Button Title", rightPointing];
关于ios - 按钮标题中的引号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15617060/