UIWebView modal YouTube player “Done” button action

前端 未结 3 1684
悲&欢浪女
悲&欢浪女 2020-12-31 16:45

In my iPhone app, I\'m presenting a modal view controller from a home screen with a UIWebView that displays an \"inline\" embedded YouTube video using this:

         


        
3条回答
  •  旧巷少年郎
    2020-12-31 17:27

    The answer re: "I solved this setting my Modal View as my rootViewController after presenting it." is the correct approach. If you call youtube from a modally presented view controller it will return to the original controller which presented the modal one. If you then try to re-present the correct controller using flags it gets really messy and there can be timing issues. Izaakcito's method works properly.

提交回复
热议问题