I want to create a custom popup window for iPhone which should look like this:
对于 iPhone 和 iPod 设备来说,最正确的实现方法是什么?
执行此操作的最佳方法是使用 UIActionSheet。代码在这里:
UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:@"Share" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Facebook",@"Twitter", nil];
[actionSheet showInView:self.view];
UIActionSheet 从下到上包含您希望显示的一定数量的按钮。您还可以放置一个取消按钮,该按钮将自动关闭 UIActionSheet。
其外观如下:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)