您永远不会更改 unicode 值的大小,而是需要更改 textField 或 textView 的大小。
我对osx应用程序的以下代码做了同样的事情
NSArray *arrayEmoticons=[[NSArray alloc]initWithObjects:@"\U0001F61D",
@"\U0001F621",@"\U0001F61C",@"\U0001F47F",@"\U0001F603",
@"\U0001F60D",@"\U0001F612",@"\U0001F637",@"\U0001F614",
@"\U0001F60A",@"\U0001F633",@"\U0001F631",@"\U0001F628",
@"\U0001F609",@"\U0001F601", nil];
NSLog(@"%@",arrayEmoticons);
[self.textView setFont:[NSFont fontWithName:@"Helvetica-BoldOblique" size:30.0]];
for (id icon in arrayEmoticons) {
[self.textView setString:[NSString stringWithFormat:@"%@%@",self.textView.string,icon]];
}
并得到了很好的输出:

编辑:
对于 NSButton:
[self.button setFont:[NSFont fontWithName:@"Helvetica-BoldOblique" size:30.0]];
[self.button setTitle:arrayEmoticons[3]];
对于 iOS:
现在我尝试使用 ios,它成功了。您可以检查尺寸 5 和 50 的差异
self.button.titleLabel.font = [UIFont systemFontOfSize:5];
self.button.titleLabel.font = [UIFont systemFontOfSize:50];
self.button.titleLabel.text=arrayEmoticons[3];