Ricetherapy

  • 홈
  • 태그
  • 방명록

2021/06 2

webview - window.open() 처리

WebChromeClient를 상속받은 클래스를 생성하여 아래 펑션을 작성한다. override fun onCreateWindow(view: WebView?, isDialog: Boolean, isUserGesture: Boolean, resultMsg: Message?): Boolean { val newWebView = WebView(mContext) newWebView.settings.javaScriptEnabled = true var dialog = Dialog(view?.context) dialog.setContentView(newWebView) val params: ViewGroup.LayoutParams = dialog.window.attributes params.width = ViewGrou..

개발/Android 2021.06.02

IOS 웹뷰에서 window.open() 처리

IOS에서는 window.open()에 대한 처리를 기본적으로 제공하지 않아 별도로 처리를 해주어야 한다. 웹뷰 컨트롤러에 아래와 같은 펑션을 추가하여 현재 뷰 위에 window.open()으로 호출된 페이지를 덧씌운다. //window.open() 에서 호출되는 펑션 func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView? { //뷰를 생성하는 경우 let frame = UIScreen.main.bounds //파라미터로 받은 config..

개발/IOS 2021.06.02
1
더보기
프로필사진

독학정리 반박시 님말이 맞음

  • 분류 전체보기
    • 개발
      • Java
      • Kotlin
      • Android
      • IOS

최근댓글

공지사항

Archives

Calendar

«   2021/06   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바