이 코드가 있습니다.iPhone WebApp 질문
/** 웹보기를 스크린 샷으로 저장하십시오. 현재는 사진 라이브러리 에 저장하는 기능 만 지원합니다. / - (무효) saveScreenshot (NSArray를) 인수 withDict (는 NSDictionary *) 옵션 { screenRect의 CGRect = [UIScreen mainScreen] 경계]; CGRect imageRect = CGRectMake (0, 0, CGRectGetWidth (screenRect), CGRectGetHeight (screenRect));
UIGraphicsBeginImageContext(imageRect.size);
[webView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, self, nil, nil);
UIAlertView *alert= [[UIAlertView alloc] initWithTitle:nil
메시지 : 자기 cancelButtonTitle : "OK" otherButtonTitles @ : 대표 "이미지 저장"@ 무기 호] [경고 표시]; [alert release];
이것은 내 앱에서 사용한 모든 것을 저장하기위한 것입니다. 어떻게 HTML 코드에서이 버튼을 추가할까요? 어떻게해야합니까?