2013-04-10 62 views

回答

2

创建包含的WebView,然后在TableViewController在didSelectRowAtIndexPath方法添加该代码视图控制器具有特定URL的网页视图。

- (void)tableView:(UITableView *)atableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
WebViewController *WebViewController = [[TrackViewController alloc] initWithNibName:@"WebViewController" bundle:nil]; 

//And do here code for passing URL to WebViewController 

[self presentModalViewController:webViewController animated:NO]; 


} 

如果您正在使用导航控制器比

- (void)tableView:(UITableView *)atableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
    { 
    WebViewController *WebViewController = [[TrackViewController alloc] initWithNibName:@"WebViewController" bundle:nil]; 

    //And do here code for passing URL to WebViewController 

    [self.navigationController pushViewController:aTrackViewController animated:NO]; 


    } 
0

使用navigaion控制器,负载上didSelectRowAtIndexPath方法方法获取和传递所选择的URL从表

+0

可以请您给我一些代码? – user2264731 2013-04-10 06:29:29

相关问题