简体   繁体   English

iOS url Scheme在我的应用程序中启动自定义UIView

[英]IOS url Scheme launch custom UIView inside my application

I have a custom UIView in my application that I would like to make available to other applications to call using a url scheme. 我的应用程序中有一个自定义UIView,我想让其他应用程序可以使用url方案进行调用。 How would I accomplish this? 我将如何完成?

I'm able to call the application with a url scheme and it launches the application with the custom UIView, but it does not leave the calling application in place. 我可以使用url方案调用应用程序,并且它使用自定义UIView启动应用程序,但它不会将调用应用程序留在原地。

I would like to just create the custom UIView and have it display over a certain part of the screen in the calling application. 我只想创建自定义UIView并将其显示在调用应用程序的屏幕的特定部分上。 Can this be done? 能做到吗? I would also like to call this from a UIWebView with JavaScript window.location. 我也想从带有JavaScript window.location的UIWebView调用它。

Thank You 谢谢

You can't display custom UIView over part of the screen on top of calling app. 您无法在调用应用程序顶部的部分屏幕上显示自定义UIView。 All you can do it add a url handler so your app comes to foreground when calling app initiates your custom url. 所有您能做的事都添加了一个URL处理程序,以便在调用应用程序启动您的自定义URL时,您的应用程序进入前台。

I'm not sure about your second question, but I would guess it won't work - why don't you try opening your custom url in a UIWebView? 我不确定您的第二个问题,但是我想它不会起作用-您为什么不尝试在UIWebView中打开自定义网址?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM