简体   繁体   English

UICollectionView单元格用户交互已禁用

[英]UICollectionView cell user interaction disabled

I am using collection view in iPhone application to show list. 我正在iPhone应用程序中使用收藏夹视图来显示列表。 now while using the cell for row at the index path method I am using set selected to yes. 现在,当在索引路径方法中将单元格用于行时,我正在使用选择为yes的集合。 this will make my cell user interaction disable. 这将使我的手机用户交互功能失效。 I don't know what is the reason behind it. 我不知道背后的原因是什么。

i solved it by adding method. 我通过添加方法解决了。

    [newCell setSelected:YES];  



[collectionView selectItemAtIndexPath:indexPath animated:YES scrollPosition:UICollectionViewScrollPositionNone];

accordingly. 因此。

as per given in this link UICollectionView Select and Deselect issue 按照此链接中给出的UICollectionView选择和取消选择问题

Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 UICollectionView isUserInteractionEnabled阻止单元格交互 - UICollectionView isUserInteractionEnabled blocks cell interaction 在子视图的子视图中禁用了用户交互 - User Interaction disabled in subview of a subview 如何在发生交互时禁用UICollectionView中的用户交互 - how to disable user interaction in a UICollectionView while an interaction is occurring 如何在禁用用户交互的情况下为子视图实现longPressGestureRecognizer? - How implement longPressGestureRecognizer for subview with disabled user interaction? 在iOS 7的UIViewController上禁用了子视图用户交互 - subview user interaction disabled on UIViewController on iOS 7 错误:在UIScrollView的下半部分禁用了用户交互 - Error: User interaction disabled in lower parts of UIScrollView 用户可以切换到禁用了用户交互的UITextField - User can tab to a UITextField that has user interaction disabled UICollectionView允许用户选择单元格颜色 - UICollectionView allow user to choose cell colour 识别用户何时按下UICollectionView单元格 - Recognize when the user touches down on UICollectionView cell 为单元的子视图实现不同的用户交互功能 - Implementing different user interaction function for subviews of a cell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM