Add UIButton in a UIWebView

前端 未结 4 1276
花落未央
花落未央 2021-01-14 18:41

I have a UIWebView which is already filled by my request (loadRequest).

I would like to add a UIButton in it. It\'s easy to write this simple code :

         


        
4条回答
  •  难免孤独
    2021-01-14 19:03

    On iOS 5 you can directly access a UIWebView's scroll view, which is where you really want to add your button, https://developer.apple.com/documentation/uikit/uiwebview/1617955-scrollview. But I tend to agree with the previous commenters, you should probably be considering a different approach as mixing UIKit with a web view isn't really meant to work how you describe.

提交回复
热议问题