草庐IT

iphone - 什么 ios 方法引用 "login through UIWebview and redirects me to another view controller"?

coder 2024-01-27 原文

我正在开发使用后端网络服务 (django) 的 iphone 应用程序。

为了登录 Web 服务,我制作了一个包含(并显示)登录网页 (html) 的 webview (loginviewcontroller)。

在我提交用户名和密码后,django 网站将我重定向到一种仪表板页面。(如果登录成功)

我只想登录网络服务,而不是重定向到另一个网页。

在这种情况下我可以指望哪些方法引用?

我希望它在登录成功后将我重定向到另一个 View Controller 。

最佳答案

您需要为此制定自定义逻辑。

您可以在 webview 完成加载的 webview 委托(delegate)方法中检查登录。

在那里你可以为 url 设置条件。

如果您在登录后获得所需的 url,则移动到下一个选项卡。

关于iphone - 什么 ios 方法引用 "login through UIWebview and redirects me to another view controller"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9988911/

有关iphone - 什么 ios 方法引用 "login through UIWebview and redirects me to another view controller"?的更多相关文章

随机推荐