uiwebview加载网页后根据内容设置大小
来源:互联网 发布:三盛网络机柜 编辑:程序博客网 时间:2024/05/19 19:42
-(void)setWebView{
web=[[UIWebView alloc]initWithFrame:CGRectMake(5, imageView.frame.origin.y+imageView.frame.size.height,310, 0)];
web.userInteractionEnabled =NO;
NSString* url=self.gamemodel.appIntroduce;
NSURLRequest* re=[[NSURLRequestalloc]initWithURL:[NSURLURLWithString:url]];
[web loadRequest:re];
web.autoresizingMask=UIViewAutoresizingFlexibleHeight;
[(UIScrollView* )[[websubviews]objectAtIndex:0]setBounces:NO];
web.scalesPageToFit =NO;
web.delegate =self;
[msaddSubview:web];
}- (void)webViewDidFinishLoad:(UIWebView *)webView{
CGRect frame = webView.frame;
frame.size.height =1;
webView.frame = frame;
CGSize fittingSize = [webView sizeThatFits:CGSizeZero];
frame.size = fittingSize;
webView.frame = frame;
// frame 根据实际需求来写
[ms setContentSize:CGSizeMake(320,webView.frame.size.height+self.gamemodel.appTesks.count*51+30+22)];
}
- uiwebview加载网页后根据内容设置大小
- 计算UIWebView加载网页的内容高度
- Web中模态对话框加载后根据加载内容动态改变其大小并使其居中
- Web中模态对话框加载后根据加载内容动态改变其大小并使其居中
- UIWebView根据加载的内容自动适应高度
- UIWebView 自适应内容大小
- 根据字符串内容动态设置UILabel大小
- UIwebview显示网页内容
- UIWebView获取网页内容
- APP中 UIWebView加载网页后,…
- 使用UIWebView加载网页
- UIWebView 加载网页
- UIWebView加载https网页
- UIWebView加载网页
- UIWebView 加载js内容 设置宽度自动换行
- iOS网页-加载网页(UIWebView)
- UIWebView根据内容自适应高度
- UIWebView 显示正在加载网页
- 关于rs.next()问题
- java 高级工程师 笔试题
- sort函数用法
- 经典效果组件篇1——工程中插入悠米全屏广告
- PHP中引用的使用
- uiwebview加载网页后根据内容设置大小
- Spring之工厂模式
- Activity.RESULT_OK
- ASN1 基础知识4
- 撸到猴年马月之保卫萝卜(序)
- 鸟哥的linux私房菜 mark3
- Android中关于Adapter的使用(再上)ArrayAdapter
- struts2-局部类型和全局类型转换器
- adb命令