[iOS] iOS(iPhone)의 UIWebView 에서 javascript 의 alert 을 UIAlertView 로 입맛에 맞게 변경하기
내가끄적인글/프로그래밍 2010. 9. 17. 15:44//@Geunwon,Mo 2010.9.17 : UIWebView 의 Javascript alert을 위한 카테고리.
@interface UIWebView (JavaScriptAlert)
- (void)webView:(UIWebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame;
@end
//@Geunwon,Mo 2010.9.17 : UIWebView 의 Javascript alert을 위한 카테고리.
@implementation UIWebView (JavaScriptAlert)
- (void)webView:(UIWebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame {
NSLog(@"javascript alert : %@",message);
UIAlertView* customAlert = [[UIAlertView alloc] initWithTitle:@"Hana Bank" message:message delegate:nil cancelButtonTitle:@"확인" otherButtonTitles:nil];
[customAlert show];
[customAlert autorelease];
}
@end
UIAlertView* customAlert = [[UIAlertView alloc] initWithTitle:nil message:message delegate:nil cancelButtonTitle:@"확인" otherButtonTitles:nil];
'내가끄적인글 > 프로그래밍' 카테고리의 다른 글
[cocos2d] 게임 개발 시작 (0) | 2011.01.31 |
---|---|
[iOS] iOS (iPhone,iPod touch) 의 MKMapView 정리하기 (47) | 2010.11.18 |
[iOS] UIAlertView 를 모달(modal) 창 처럼, 버튼 누르기전까지 대기하기 (18) | 2010.10.01 |
[iOS] iOS(iPhone)의 UIWebView 에서 javascript 의 alert 을 UIAlertView 로 입맛에 맞게 변경하기 (8) | 2010.09.17 |
[android] Android 의 TableLayout 의 코너를 둥글게~ (Rounded corner) (19) | 2010.07.15 |
[android] Android 의 MapView (Google API) 정리하기. (128) | 2010.07.10 |
[java] 맥북에서 개발하기! 이클립스 빠르게하자! (Speed up Eclipse on OSX) (10) | 2010.07.05 |
webkit.framework를 추가해야 사용이 가능한가요?
추가하지 않아도 사용이 가능합니다 :-)
다시 해봐야겠네요~ 감사합니다. ^^
넵~ 성공하세요 ^^;
이것 안되는데요..
관련 .H와 .M 파일 좀 보여줄수 있는지요..
본문에 있는것이 전부입니다...
탭바와 네비게이션바 그리고 웹뷰를 넣어서 현재 웹페이지를 가져오도록 해놓은 상태입니다.
위 부분을 탭바에 추가된 콘트럴러의 헤더 부분과 구현을 했지만 작동이 안되는것 같습니다.
프로젝트 생성시 window-base기반으로 생성하여 클래스파일을 탭갯수만큼 만들어서 구현한 상태입니다.
뭐가 잘못된것일까요?
window-base 와는 상관이 없고 말씀하신대로 현재 뷰콘트롤러의 헤더부분에 추가로 정의해주시면 될텐데요.
웹뷰 콘트롤러에 카테고리형식으로 추가가 되었는지 확인이 필요할것 같습니다.