操作表按钮文本对齐方式

时间:2014-06-18 19:23:47

标签: ios uiactionsheet

我正在使用动作表,我添加了unicode符号。但我的按钮标题不居中。我希望unicode符号位于最右边。如果您认为不可能,我可以单独使用标志图像而不是使用unicode符号吗?如果是,我怎么能在按钮标题旁边添加图像?

UIActionSheet *actionsheet = [[UIActionSheet alloc] initWithTitle:@"Would you like to see ozone cloud in your area or a trace of your walking/driving/biking activity" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"OzoneMap",@"ParticleMap", @"TraceMap      \U0001F6A9", nil];

[[[actionsheet valueForKey:@"_buttons"] objectAtIndex:0] setImage:[UIImage imageNamed:@"play2.png"] forState:UIControlStateNormal];

enter image description here

0 个答案:

没有答案