首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    直播卖货小程序源码中,商品分类页面是如何实现的

    判断滑动是不是因为点击一级分类引起         isClickLeft = YES;         selectTableIndex = indexPath.row;         [tableView reloadData...的代理方法中更改一级分类的选中 ///collectionview将要加载头尾视图调用的方法 - (void)collectionView:(UICollectionView *)collectionView...        ///更新当前选中的一级分类的indexpath         selectTableIndex = indexPath.section;         [_classTableView reloadData...];     } } ///collectionview已经加载完头尾视图调用的方法 - (void)collectionView:(UICollectionView *)collectionView...        ///更新当前选中的一级分类的indexpath         selectTableIndex = indexPath.section;         [_classTableView reloadData

    1.2K20

    Swift 自定义布局实现瀑布流视图

    在实现该功能之前,我们先了解一下 UICollectionView 的布局过程,它与布局对象之间的关系是一种协作的关系,当 UICollectionView 需要一些布局信息的时候,它会去调用布局对象的一些函数...,这些函数的执行是有一定的次序的,如图所示: 所以我们继承自 UICollectionViewLayout 的子类必须要实现以下方法: override var collectionViewContentSize...了解完需要实现的函数后,接下来就开始计算瀑布流视图的布局属性了,在这里我先讲一下我实现的大概思路吧!...我们可以在 prepare() 函数中,添加这些逻辑,代码如下: override func prepare() { super.prepare() // 计算每个 Cell...systemBlue : .purple if itemCount - 1 == indexPath.item { itemCount += 20 collectionView.reloadData

    2.6K30

    微信反复读取你的相册!官方回应:为便于聊天时快速发图,最新版本将取消

    样例代码如下: func photoLibraryDidChange(_ changeInstance: PHChange) {     guard let collectionView = self.collectionView...                    if let removed = changes.removedIndexes where removed.count                         collectionView.deleteItems...                    if let inserted = changes.insertedIndexes where inserted.cou                         collectionView.insertItems...                    if let changed = changes.changedIndexes where changed.count                         collectionView.reloadItems... {                 // Reload the collection view if incremental diffs are not avail                 collectionView.reloadData

    40530
    领券