0
我需要在iPhone中的UIWebview中加載網址。但該網址是htm格式。所以,這個url不會在UIWebview中加載。如何從URL加載htm文件?
我使用以下URL作爲解析:http://feeds.epicurious.com/latestfeatures,我將圖像url作爲htm格式。
圖片網址是http://feedads.g.doubleclick.net/~at/-0LKpwQCz1qAqaaMSvxTK4I9PjA/0/di
。
有一種方法可以在UIWebview中加載此URL。
是否有另一種可能的方式來加載該URL在UIImageview?如果有任何方法,加載UIImageview,它也適合我。
我用下面的代碼:
UIView* testView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)] autorelease];
UIWebView* testWebView = [[[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)] autorelease];
[testView addSubview:testWebView];
[testWebView setDelegate:self];
[testWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://feedads.g.doubleclick.net/~at/K_fHnmr7a7T0pru2TjQC29TsPYY/1/di"]]];
[self.view addSubview:testView];
我的URL頁面:
我打開該網址在瀏覽器中,我看到的是一個白色/透明的1x1像素的圖片。你確定這不是一個笑話,或者你不希望通過一些來自用戶的幫助來增加你的廣告營業額? – 2010-12-09 09:15:25
不,多米尼克..你誤解我了......我現在附上截圖了..現在看截圖..我需要加載在我的iphone動畫圖像... – Velmurugan 2010-12-09 09:52:54