UICollectionViewCell Custom Button, uicollectionviewcell
UICollectionViewCell Custom Button
Effect
Features
1. dynamically set the number of buttons displayed on each line and the placement format of controls
2. Implement the single-choice or multiple-choice function to implement click events
3. Custom button display style
Usage
1. Download the source code and import the GridCollectionView. h/. m file, CustomCollectionViewCell. h/. m file, and TypeCellClass. h/. m file into the project.
2. Note: The cell you create must inherit CustomCollectionViewCell. Then you can implement several methods of its inherited classes on the cell and create the interface you want.
3. Import the relevant header file in the Controller. For detailed usage, refer to the source code.
Source code
Github: https://github.com/makingitbest/Button-CollectionView
Details
1. Based on UICollectionViewCell, we provide several methods for you to customize the control to be displayed in the future. This demo is the loaded button.
2. This class is used to pass in the registered cell type. identifier externally.
3. encapsulation of UICollectionView
The above are the underlying encapsulation.
4. perform the following operations:
5. It has a protocol for processing click events
6. The single-choice and multi-choice states are set to internal processing of the respective cells.