5、deeplink customerservice no permission
APP拉起微信客服功能
uniapp跳转微信客服报错 (deeplink customerservice no permission)
https://blog.csdn.net/PlutoZML/article/details/120783101
https://ask.dcloud.net.cn/question/135519
4.cellForItemAtIndexPath 返回空
- 动画需要获取当前的 Cell ,下面的调用在 viewDidLoad 中,有时候返回 nil,有时候成功。
UICollectionView cell = (UICollectionView)[self.collectionView cellForItemAtIndexPath:indexPath];
简单的解决方法,是在调用之前添加:
[self.collectionView layoutIfNeeded];
原因是,根据苹果开发者文档:
UICollectionView如果 cell 不是 visible 的 或者 indexPath 超过有效范围,就返回 nil。
在 iOS 10 上 还有一种解法, 但这种就牺牲了性能:
[self.collectionVew setPrefetchingEnabled: NO];
引用:https://yiweifen.com/html/news/WaiYu/13536.html
https://blog.csdn.net/weixin_30462049/article/details/94863575
- 点击cell reload oldIndex
[collectionView reloadItemsAtIndexPaths:@[oldIndexPath,indexPath]];
如果oldIndex和indexPath,会有显示bug
if (oldIndex != indexPath.row) {
[collectionView reloadItemsAtIndexPaths:@[oldIndexPath,indexPath]];
}
3. UITableViewCell 上的按钮 点击无响应(这个问题怪异)
解决方案:添加背景色,
self.contentView.backgroundColor = [UIColor xxx];
self.backgroundColor = [UIColor xxx];
2. UITableView 头部有偏移距离
解决方案:添加表头,高度为0
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SSWIDTH, 1)];
self.ttableView.tableHeaderView = view;
1、UITableView,UICollectionView 判断reloadData结束
UITableView reloadData
//方法1:
[self.tableView reloadData];
[self.tableView layoutIfNeeded];
//刷新完成,其他操作,有时候这个方法无效
//方法2:
[self.tableView reloadData];
[self.tableView layoutIfNeeded];
dispatch_async(dispatch_get_main_queue(),^{
//刷新完成,其他操作
});
UICollectionView reloadData
//方法1:刷新完成,其他操作,有时候这个方法无效
[self.collectionView reloadData];
[self.collectionView layoutIfNeeded];
//方法2:
[self.collectionView reloadData];
[self.collectionView layoutIfNeeded];
dispatch_async(dispatch_get_main_queue(),^{
//刷新完成,其他操作
});
//方法3:
[self.collectionView performBatchUpdates:^{
//刷新操作
} completion:^(BOOL finished) {
//刷新完成,其他操作
}];
}];