2014-02-10 16 views
0

所以我有一个UIWebview里面的自定义UICollectionViewCell,当我加载我的集合查看web视图内的html加载就好,但我无法与它交互(滚动,缩放等)。它就好像网络视图禁用了用户交互(但显然不是这样)。香港专业教育学院搜查,而现在似乎并不能找到一个解决这个...UICollectionViewCell里面的UIWebView不会滚动,被禁用

继承人的代码片断我用来加载这个特定的细胞:

cell = (WWPlayerResultsCell *) [collectionView dequeueReusableCellWithReuseIdentifier:@"statsDetailResults" forIndexPath:indexPath]; 


if (cell == nil) { 
    NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"WWPlayerResultsCell" owner:nil options:nil]; 
    cell = [nib objectAtIndex:0]; 
} 

[((WWPlayerResultsCell*) cell) setUrlStr:[NSString stringWithFormat:@"http://google.com"]]; 
[((WWPlayerResultsCell*) cell) loadWebView]; 

return cell; 

UICollectionView Screen

回答

0

找到解决方案...显然是顶视图(查看[nib objectAtIndex:0];)被设置为UIView而不是UICollectionViewCell。在IB做这个改变,一切都很好。

相关问题