Action Sheet Button text alignment

偶尔善良 提交于 2019-12-25 07:38:45

问题


I am using actionsheet, and I have added unicode symbol. But my button title is not centered. I want the unicode symbol to be located at right most. If you think that it is impossible, can I use flag image separately rather than using unicode symbol ? If yes, how could I add image next to the button title?

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];

来源:https://stackoverflow.com/questions/24293544/action-sheet-button-text-alignment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!