在ios webView中显示图像无法正常工作
问题描述:
Im在ios webbView上显示imagelink时遇到了一些问题。发生了什么事是,我已经放下网页视图在我的厦门国际银行文件,并出口连接,但我还是老样子不能让图像显示出来..在ios webView中显示图像无法正常工作
中的代码ViewController.m
#import "ViewController.h"
@interface ViewController()
@end
@implementation ViewController
- (void)viewDidLoad {
NSString *urlLink = @"http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={FDCE3A18-B5F6-45F4-B9B2-EA9171290F71}&period=&week=41&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=844&height=629&maxwidth=844&maxheight=629";
//Create a URL object.
NSURL *url = [NSURL URLWithString:urlLink];
//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
//Load the request in the UIWebView.
[self.webView loadRequest:requestObj];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
如果有人能弄清楚问题是什么,我会很感激!
问候奥利弗
答
http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={FDCE3A18-B5F6-45F4-B9B2-EA9171290F71}&period=&week=41&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=844&height=629&maxwidth=844&maxheight=629
这不是一个直接链接到的图像。这可能是你的问题。尝试使用像这样的正常图像链接https://www.google.com/images/srpr/logo3w.png
,它应该显示出来。
我知道该链接后面没有前缀,但这是我在尝试使用谷歌浏览器复制图片链接时得到的链接。 – FreeSirenety
做其他图片和网站的工作? –
是的,他们这样做,我试着将它链接到谷歌为例,它工作得很好;) – FreeSirenety