gpt4 book ai didi

ios - "loadHTMLString:baseURL:"iPhone SDK

转载 作者:行者123 更新时间:2023-11-29 05:00:49 25 4
gpt4 key购买 nike

我正在编写我的第一个 iPhone 应用程序..

如何使用“loadHTMLString:baseURL:”将用户发送到名为“pagetwo.m”的 View ?

最佳答案

要从一个 View 导航到另一个 View 或插入 subview ,给定的解决方案是正确的,下面是示例代码,让您知道如何使用 UIWebView 的委托(delegate)方法 loadHTMLString:baseURL:...

    NSString *embedHTML = [NSString stringWithFormat:@"<HTML><HEAD><TITLE>Page 1</TITLE></HEAD><BODY><H2>HTML Code Editor</H2><H3>p1 - The Basic Page</H3>"
"<P>This is the basic webpage. The HTML tags, BODY, H2, H4, P and A were used, but since no attributes were added to these tags, they are left at their defaults. The links below are shown using their default colors.</P>"
"<A HREF=\"http://www.google.com\">Google.com</A><BR><A HREF=\"http://www.yahoo.com\">Yahoo</A><BR></BODY></HTML>"];
[webView loadHTMLString:embedHTML baseURL:nil];

关于ios - "loadHTMLString:baseURL:"iPhone SDK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7020715/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com