ios - 收藏视图交互在 iPhone12 pro max 上不起作用
问题描述
在我的一个应用程序中,我实现了带有集合视图的仪表板屏幕,当用户单击集合视图单元格时,它没有交互,这仅发生在 iPhone12 pro max 用户身上
目前我没有要测试的实时设备,但我已经在 iPhone12 pro max 模拟器中进行了测试,并且工作正常
您能否提出原因或任何建议?提前致谢
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.section == 0)
{
customClassCollectionViewCellOne *cell = [[customClassCollectionViewCellOne alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
cell = (customClassCollectionViewCellOne *)[collectionView dequeueReusableCellWithReuseIdentifier:@"accountBalance_main_collectionview" forIndexPath:indexPath];
cell.balanceArray = newbalanceArray;
cell.delegate = self;
[cell.collectionView reloadData];
return cell;
}
else if (indexPath.section == 1)
{
customClassCollectionViewCellTwo *cell = [[customClassCollectionViewCellTwo alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
cell = (customClassCollectionViewCellTwo *)[collectionView dequeueReusableCellWithReuseIdentifier:@"QuickActions_main_collectionview" forIndexPath:indexPath];
cell.quickActionList = viewModel.quickActionsList;
cell.delegate = self;
[cell.collectionView reloadData];
return cell;
}
else
{
customClassCollectionViewCellThree *cell = [[customClassCollectionViewCellThree alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
cell = (customClassCollectionViewCellThree *)[collectionView dequeueReusableCellWithReuseIdentifier:@"GetInTouch_main_collectionview" forIndexPath:indexPath];
cell.getinTouchList = viewModel.touchList;
cell.delegate = self;
[cell.collectionView reloadData];
return cell;
}
}
只是通知自定义collectionview单元类再次包含子collection view
解决方案
尝试将您的视图组件添加到单元格的内容视图中,而不是直接作为子视图。
推荐阅读
- windows - 从 Git Bash (MINGW64) 运行 MSVC 'cl.exe'
- ios - 我无法构建 iOS 项目
- azure-functions - Azure 逻辑应用 FTP 并发触发器
- java - 无法对非静态字段方法第 17 行和第 9 行进行静态引用
- reactjs - React-Boostrap - 在底部修复行
- python - 基于 __hash__ 设置更改隐式顺序?
- python - ValueError:没有足够的值来解包(预期 2,得到 1)Json 转储
- sql - SQL 这个速记是一样的吗?SQL 可读性
- ruby-on-rails - Websocket 连接失败 - 不确定代码的哪一部分是错误的
- java - 使用 GWT、Tomcat 和 Apache 接收 RPC 错误