2012-10-09 55 views
1

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 

如果有人能弄清楚問題是什麼,我會很感激!

問候奧利弗

回答

0
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,它應該顯示出來。

+0

我知道該鏈接後面沒有前綴,但這是我在嘗試使用谷歌瀏覽器複製圖片鏈接時得到的鏈接。 – FreeSirenety

+0

做其他圖片和網站的工作? –

+0

是的,他們這樣做,我試着將它鏈接到谷歌爲例,它工作得很好;) – FreeSirenety