UIActionSheet是iOS开发中实现警告框的重要的类,在非常多情况下都要用到:
UIActionSheet * sheet = [[UIActionSheet alloc] initWithTitle:@"确定要清空图片缓存?" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"确定", @"确定", @"确定", @"确定", @"确定", @"确定", nil];
[sheet showInView:self.view];