一,效果图。
二,代码。
RootViewController.m
//点击任何处出现sheet
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UIActionSheet * sheet = [[UIActionSheet alloc] initWithTitle:@"确定要清空图片缓存?" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"确定" otherButtonTitles:nil, nil];
[sheet showInView:self.view];
}