gpt4 book ai didi

iphone - 如何自定义UIWebView?

转载 作者:行者123 更新时间:2023-12-03 21:03:25 25 4
gpt4 key购买 nike

实际上我有一个表格 View ,当选择rowAtIndexPath时,它会加载我的webView并播放我的视频,如何从UIWebView返回到我的tableView?

 -(void)playButtonPressed1:(UIButton*)sender
{


Video *currentVideo= [[xmlParservideo videoNames] objectAtIndex:btn1.tag];


NSLog(@"content============== %@", [currentVideo content2]);



CGRect webFrame = CGRectMake(0.0, 0.0, 320.0, 460.0);
UIWebView *webView = [[UIWebView alloc] initWithFrame:webFrame];
[webView setBackgroundColor:[UIColor greenColor]];
NSString *urlString=currentVideo.content2;

NSURL *url = [NSURL URLWithString:urlString];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
[[self view] addSubview:webView];
// [self.navigationController popViewControllerAnimated:YES];


NSLog(@"jointed2 jjjjjjjjj %d",btn1.tag);

最佳答案

将 Uiwebview 放置在另一个 View Controller 中,并在选择一行时以及视频完成弹回到 tableview Controller 时推送到它。

关于iphone - 如何自定义UIWebView?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11221144/

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