【发布时间】:2014-01-25 00:12:51
【问题描述】:
当我选择 tableview 行时,滚动视图是打开的,所以我怎样才能获得索引号。表视图和滚动视图的位置是什么 我的代码是
-(void)tableView:(UITableView *)tableView SelectRowAtIndexPath:(NSIndexPath *)indexPath{
AppDelegate *objAppdelegate = [[UIApplication sharedApplication] delegate];
if (objAppdelegate.isLegalUpdate_Event_CA==1){
UIWebView *webvews=[[UIWebView alloc]initWithFrame:CGRectMake(scrolvew.frame.size.width * i, 50, 320, scrolvew.frame.size.height-50)];
webvews.delegate=self;
[webvews loadHTMLString:ObjtpostAll.post_content baseURL:nil];
//webvews.backgroundColor=[UIColor redColor];
webvews.backgroundColor=[UIColor whiteColor];
[scrolvew addSubview:webvews];
[webvews release];
}
scrolvew.contentSize = CGSizeMake(scrolvew.frame.size.width * [pullRefereshTableViewController.arrData count], scrolvew.frame.size.height);
[scrolvew setContentOffset:CGPointMake(indexPath*320, 0)];
【问题讨论】:
-
你真的要覆盖
selectRowAtIndexPath:animated:scrollPosition:吗?
标签: ios iphone uiscrollview delegates stack-overflow