gpt4 book ai didi

objective-c - iPhone/iPad Web View 示例

转载 作者:太空狗 更新时间:2023-10-30 03:21:11 25 4
gpt4 key购买 nike

在哪里可以找到有关如何创建和使用 UIWebView 的简单可编译示例?

有没有非界面构建器的例子?

最佳答案

UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
[webView setDelegate:self];

NSString *urlAddress = @"http://www.google.com/";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];

[self.view addSubview:webView];

关于objective-c - iPhone/iPad Web View 示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3304920/

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