-(
void
)longTopAction:(
UILongPressGestureRecognizer
*)tap
{
if (tap. state == UIGestureRecognizerStateBegan ) {
UIAlertView *alert=[[ UIAlertView alloc ] initWithTitle : @" 是否要保存图片 "
message : nil delegate : self cancelButtonTitle : @" 取消 " otherButtonTitles : @" 保存 " , nil ];
[alert show ];
}
}
#pragma mark-UIAlertViewDelegate
- ( void )alertView:( UIAlertView *)alertView clickedButtonAtIndex:( NSInteger )buttonIndex
{
if (buttonIndex == 1) {
// 将图片保存到本地相册
UIImageWriteToSavedPhotosAlbum ([ fullImageView image ], nil , nil , nil );
UIAlertView *alert=[[ UIAlertView alloc ] initWithTitle : @" 保存成功 " message: @" 是否打开相册查看 " delegate: self cancelButtonTitle : @"NO" otherButtonTitles : nil , nil ];
[alert show ];
}
}
{
if (tap. state == UIGestureRecognizerStateBegan ) {
UIAlertView *alert=[[ UIAlertView alloc ] initWithTitle : @" 是否要保存图片 "
message : nil delegate : self cancelButtonTitle : @" 取消 " otherButtonTitles : @" 保存 " , nil ];
[alert show ];
}
}
#pragma mark-UIAlertViewDelegate
- ( void )alertView:( UIAlertView *)alertView clickedButtonAtIndex:( NSInteger )buttonIndex
{
if (buttonIndex == 1) {
// 将图片保存到本地相册
UIImageWriteToSavedPhotosAlbum ([ fullImageView image ], nil , nil , nil );
UIAlertView *alert=[[ UIAlertView alloc ] initWithTitle : @" 保存成功 " message: @" 是否打开相册查看 " delegate: self cancelButtonTitle : @"NO" otherButtonTitles : nil , nil ];
[alert show ];
}
}