webview自适应高度
来源:互联网 发布:wemall java版 编辑:程序博客网 时间:2024/05/18 03:16
_detailWebView = [[UIWebViewalloc]initWithFrame:CGRectMake(0,CGRectGetMaxY(view.frame)+35,KScreenWidth,KScreenHeight-64-290)];
_detailWebView.delegate = self;
//预先加载url
NSString *detailStr = self.model.questiondesc;
NSString *newUrll = [detailStrstringByReplacingOccurrencesOfString:@"/upimg"withString:@"http://"];
[_detailWebView loadHTMLString:newUrll baseURL:nil];
[self.viewaddSubview:self.detailWebView];
#pragma mark - UIWebView Delegate Methods
-(void)webViewDidFinishLoad:(UIWebView *)webView
{
//获取到webview的高度
CGFloat height = [[self.webViewstringByEvaluatingJavaScriptFromString:@"document.body.offsetHeight"]floatValue];
self.webView.frame =CGRectMake(self.webView.frame.origin.x,self.webView.frame.origin.y,KScreenWidth, height+20);
}
- webview 文本 自适应 高度
- WebView自适应高度
- webview自适应高度
- webview高度自适应
- tablviewcell和webview自适应高度
- webview显示以及高度自适应
- tableViewCell 上面webView 自适应高度
- iOS WebView自适应内容高度
- WebView自适应实际内容高度
- webview高度自适应图文详情
- 获取webView内容高度,自适应高度
- iOS storyboard约束加载webView自适应高度
- iOS storyboard约束加载webView自适应高度
- IOS TableViewCell嵌套webview 自适应高度
- iOS的WebView自适应内容高度
- iOS的WebView自适应内容高度
- Cell上webview加载自适应高度
- cell中嵌套webview自适应高度
- leetcode 37. Sudoku Solver
- 今天给大家讲个故事
- 近期学习内容顺序
- 支付宝支付
- Mac系统下,Hadoop 2.6.2 + Mahout 0.12.1 完全分布式配置
- webview自适应高度
- 二叉树及其应用--二叉树特征值与销毁
- junit
- Android开发之如何保证Service不被杀掉
- mysql的约束
- 线性表-多项式加法(数据结构基础 第2周)
- Activity生命周期详解
- TCP/IP、Http/Soap协议-基本认识
- 银联支付