643
yesterday 772
visitor 23,540,487
1

[IOS] 웹뷰의 자바스크립트 alert 팝업 수정

조회 수 16036 추천 수 0 2015.11.27 15:11:04

IOS 에서 UIWebView 사용시 웹 페이지의 alert 창의 제목을 없애거나 기타 수정하는 방법입니다.

웹뷰가 포함된 클래스의 .h 파일에 아래를 추가합니다.

@interface UIWebView (Javascript)
  - (void)webView:(UIWebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message     initiatedByFrame:(id *)frame;
@end 



웹뷰가 포함된 클래스의 .m 파일에 아래를 추가합니다.

@implementation UIWebView (Javascript)
   - (void)webView:(UIWebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(id *)frame {
      UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:message delegate:nil cancelButtonTitle:@"확인" otherButtonTitles: nil];
      [alert show];
   }
@end 


위에서 initWithTitle 을 nil 로 했으므로 제목은 나오지 않습니다. 옵션을 조절해서 버튼 텍스트 등을 수정할 수 있습니다.



출처 : http://www.fun25.co.kr/blog/ios-webview-javascript-alert-customize/

 

 

'헬로마켓'과 함께하는 스마트한 중고 아이템 거래

https://www.hellomarket.com


1
profile

Parker

September 14, 2022
*.255.168.18

Nike Store Nike Shoes Men Air Jordan 1 Balenciaga Pandora Bracelet Charms Nike Shoes Women Pandora Jewelry Official Site Balenciaga Men's Nike Shoes Air Jordan One Asics Outlet Pandora Balenciaga Triple S Nike Air Max 720 Pandora Outlet Pandora Jewelry Charms Nike Sneakers For Women Asics Shoes Pandora Jewelry Salvatore Ferragamo Moncler Jackets Jordan 1 Dior Air Jordan 1 Low Nike Sneakers Nike Air Max Pandora Jewelry Jordan 1 Low Nike Sneakers For Men Nike Air Jordans Pandora Nike Canada Online Pandora Yeezy Pandora Bracelets Nike Outlet Online Balenciaga Shoes Ferragamo Shoes New Nike Shoes Nike Shoes Canada Pandora Outlet Pandora Jewelry Moncler Jacket Air Jordan 1 High Jordan 1 Retro Ferragamo Belt Men Adidas Men's Shoes Jordans Wholesale Asics Nike Shoes Women Pandora Charms Nike Outlet Store Online Shopping Pandora Charms Jewelry Pandora Jewelry Cheap Moncler Jackets Pandora Jewelry Asics Shoes Outlet Balenciaga Sneakers Nike Outlet Store Online Shopping Nike 270 Air Max Pandora Jewelry Outlet Jordan 1 Pandora Outlet Pandora Charms Pandora Charms Outlet Pandora Bracelets Pandora Bracelets Balenciaga Sneakers Sale Cheap Moncler Jackets Outlet Moncler Pandora Jewelry Pandora Jewelry Pandora Outlet Ferragamo Pandora Charms Adidas Canada New Nike Shoes Nike Air Jordans 1 Pandora Jewellery Pandora Jewelry Jordan Retro 1 High OG Pandora Official Site Moncler Outlet Pandora Outlet Pandora Jewelry Pandora Charms Pandora Adidas Women's Shoes Puma Shoes Asics Sneakers For Women Pandora Outlet Balenciaga Shoes Adidas Outlet Wholesale Jordan Shoes Pandora Bracelets Pandora Jewelry Black Friday Nike UK Pandora Nike Store Moncler Jackets Adidas Running Shoes Pandora Charm Cheap Jordan Shoes Air Jordan 1 Pandora Charms Bracelets Yeezy Nike Running Shoes Nike Shoes For Women Pandora Charms Sale Clearance Pandora Charms Best Basketball Shoes Nike Outlet Store Pandora Air Jordan 1 Retro Pandora Bracelet Pandora Rings Official Site Pandora Pandora Jewelry Air Jordan 1 Retro Jordan 1 Pandora Outlet Moncler Coat Men Pandora Jewelry Ferragamo Jordan Retro 5 Pandora Bracelet Pandora Canada Pandora Outlet Goyard Outlet Moncler Jacket For Men Asics Running Shoes Men Adidas Official Site Pandora Jewelry Official Site Air Max 97 Jewelry Pandora Pandora Jewelry Adidas Canada Asics Kayano Moncler Outlet Online Cheap Mens Adidas Shoes Michael Jordan Shoes Adidas Sale Air Jordan 1s Nike Canada Adidas Sneakers For Women Air Jordans 1 Moncler Pandora Bracelets Charms Wholesale Jordan Shoes Pandora Charms Adidas Trainers NMD R1 Moncler Coats Cheap Nike Shoes Air Jordan Sneakers Pandora Rings Official Site Jordans Sneakers Goyard Bags
문서 첨부 제한 : 0Byte/ 2.00MB
파일 제한 크기 : 2.00MB (허용 확장자 : *.*)
List of Articles
번호 제목 글쓴이 날짜 조회 수
» [IOS] 웹뷰의 자바스크립트 alert 팝업 수정 [1] 제리 2015-11-27 16036

Program Note 로그인 :)