GithubHelp home page GithubHelp logo

donggelaile / chd_listview_structure Goto Github PK

View Code? Open in Web Editor NEW
55.0 3.0 14.0 2.42 MB

show the structure of UITableView and UICollectionView (展示tableView和collectionView的结构,框架)

License: MIT License

Ruby 19.20% Objective-C 80.80%

chd_listview_structure's Introduction

CHD_ListView_Structure

推荐一下HDCollectionView 近期写的数据驱动的滑动列表组件。基于flexBox,支持各种对齐方式、瀑布流、指定悬浮、分段布局、横向滑动等等

前言

大多数的iOS工程中,50%以上的页面是由UITableViewUICollectionView搭建的,这里统称为ListView。当我们接手已有项目时,我们如何快速的理清每个ListView的结构。或者,当我们自己写的某个页面过去很长时间时,产品过来告诉我们某个页面的某个位置需要调整,可能自己也是依稀记得哪部分是段头,哪部分是断尾,总要花一些时间来对应相应的区块。CHD_ListView_Structure正是为了让你快速的区分每个ListView的页面结构而生的。

使用

方式一

直接下载源代码,在Appdelegate导入h文件,然后调用

[CHD_ListView_Structure openStructureShow_TableV:YES collectionV:YES]; 

即可。

方式二

pod 'CHD_ListView_Structure'

然后导入头文件并调用上面的方法。

特征

  • 支持UITableViewUICollectionView结构查看
  • 支持只查看二者中一个,关闭另一个
  • 无侵入,无需继承,一句话开启关闭
  • 无论开启或关闭,只在DEBUG模式下生效
  • HeaderCellFooter使用不同颜色线框包围,并在其上展示类名及其Index
  • 提供一个简单的可拖动的Toggle按钮,实时隐藏或显示ListView的结构
  • 简单的内存泄漏判断依据(点击Toggle按钮时会打印当前存活的ListView总个数,当你返回到上一页面再次点击Toggle按钮时,如果个数未减少,那么可能存在内存泄漏)

效果

1、百思不得姐(高仿)

对开源项目百思不得姐(高仿)做了结构分析,其中部分效果图如下:

2、网易云阅读

借助神奇的工具IPAPatch来看下大厂是如何使用tableView的,部分页面如下:

其他

如有问题,还请指正,共同进步。如果对您有所帮助,希望给颗✨✨(即使现在不用,收藏起来也是极好的)

LICENSE

MIT

chd_listview_structure's People

Contributors

donggelaile avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.