更新时间:2022-11-20 12:19:42
***的方法是使用UIActionSheet。代码在这里:
The best way to do this is using a UIActionSheet. The code is here:
UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:@"Share" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Facebook",@"Twitter", nil];
[actionSheet showInView:self.view];
UIActionSheet从底部到顶部,有一定数量的按钮要显示。
A UIActionSheet comes from the bottom to the top with a certain number of buttons you wish to display. You can also put a cancel button that will automatically dismiss the UIActionSheet.
下面是它的外观: