我想在UITableView頁腳中創建一個UIWebView。該表被分組。其實我試圖用UIWebView創建一個超鏈接。例如應該有像使用UIWebView在UITableView頁腳中創建超鏈接
嘿夥計一些文字與我聯繫
聯繫我應該是一個超鏈接,我想在UITableView的頁腳本文放置。我無法弄清楚如何做到這一點。請引導我們傢伙..如果可能請張貼一些示例代碼或請給我一個教程的鏈接..我沒有使用IB在這裏創建webview ..我在.h文件中聲明剛剛的WebView
這是我在viewForFooterInSection方法寫的代碼
CGRect webFrame = CGRectMake(20,500,buttonView.frame.size.width,buttonView.frame.size.height);
webView = [[UIWebView alloc] initWithFrame:webFrame];
webView.backgroundColor = [UIColor lightGrayColor];
[self.view addSubview:webView];
NSString *html = @"<html><head></head><body>Hey Folks Contact Us</br></body></html>";
[webView loadHTMLString:html baseURL:[NSURL URLWithString:@"http://www.example.com"]];
你想把它作爲一個部分或表中的視圖嗎?如果在表中,您應該使用viewForFooterInTable。 – 2010-09-02 15:25:34
是的,我想用它作爲表中的一個視圖..即使如果沒有部分出現的超鏈接的webview應該顯示 – racharambola 2010-09-02 15:34:07