All Projects → flutting → Zztools

flutting / Zztools

Licence: mit
包括: StarView星星评价(支持半星, 整星, 任意星, 支持拖动, 支持自定义星星图片, 数量, 大小, 间距, 最低分值). 瀑布流(垂直, 浮动, 混合模式瀑布流)等.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Zztools

Node Rate Limiter Flexible
Node.js rate limit requests by key with atomic increments in single process or distributed environment.
Stars: ✭ 1,950 (+1014.29%)
Mutual labels:  rate
Cocoapods Tips
iOS 라이브러리를 관리하는 CocoaPods Tip정보 모음입니다.
Stars: ✭ 141 (-19.43%)
Mutual labels:  pod
Filebeat Kubernetes
Filebeat container, alternative to fluentd used to ship kubernetes cluster and pod logs
Stars: ✭ 147 (-16%)
Mutual labels:  pod
Luexpandabletableview
A subclass of UITableView with expandable and collapsible sections
Stars: ✭ 125 (-28.57%)
Mutual labels:  pod
Web Presentation
Jekyll theme template to create web presentation
Stars: ✭ 137 (-21.71%)
Mutual labels:  easy
Update
清晰灵活简单易用的应用更新库
Stars: ✭ 1,739 (+893.71%)
Mutual labels:  easy
Easy.logger
A modern, high performance cross platform wrapper for Log4Net.
Stars: ✭ 118 (-32.57%)
Mutual labels:  easy
Q Municate Ios
Q-municate iOS repository
Stars: ✭ 164 (-6.29%)
Mutual labels:  easy
Abexpandableview
Expandable, collapsible, filterable and single/multi selectable table view.
Stars: ✭ 138 (-21.14%)
Mutual labels:  pod
Ngx Bar Rating
Angular Bar Rating
Stars: ✭ 146 (-16.57%)
Mutual labels:  rate
Ckube
A cli to simplify working with kubectl for some common workflows
Stars: ✭ 127 (-27.43%)
Mutual labels:  pod
Seahorse
A minimal CLI framework written in Rust
Stars: ✭ 132 (-24.57%)
Mutual labels:  easy
Youtube Projects
This repository contains all the code I use in my YouTube tutorials.
Stars: ✭ 144 (-17.71%)
Mutual labels:  easy
K8s
Deploying Kubernetes High Availability Cluster with Ansible Playbook
Stars: ✭ 125 (-28.57%)
Mutual labels:  pod
Xhtoast
简洁轻便提示工具,一行代码既可完成提示信息显示 - 支持自定义显示位置及停留时间
Stars: ✭ 152 (-13.14%)
Mutual labels:  pod
Node Currency Swap
Currency Exchange Rates library for nodejs
Stars: ✭ 119 (-32%)
Mutual labels:  rate
Script
Making it easy to write shell-like scripts in Go
Stars: ✭ 1,946 (+1012%)
Mutual labels:  easy
Easywall
Web interface for easy use of the IPTables firewall on Linux systems written in Python3.
Stars: ✭ 172 (-1.71%)
Mutual labels:  easy
Uiimage Imagecompress
An iOS library to compress images and optimize uploads
Stars: ✭ 155 (-11.43%)
Mutual labels:  pod
Bekcurvetabbar
Full Customizable Tabbar with IBInspectables
Stars: ✭ 144 (-17.71%)
Mutual labels:  pod

功能简介

  1. 瀑布流: 自定义collectionView的layout, 提供垂直&水平&浮动;水平&多状态混合瀑布流效果(可实现淘宝SKU选择的浮动效果), 支持设置不同分区不同背景颜色.
  2. 星星评价: 可自定义星星数量, 分级, 最低分, 支持拖拽手势, 支持半颗星(同样支持小数, 最低0.01).
  3. 页面路由: 模块解耦, 组件化必备, 用法简单, 支持正向传值以及反向传值, 无需继承, 侵入性低.

使用方法

导入

  1. 可直接下载demo, 将ZZTools文件夹拖入工程中使用.

  2. cocoapods集成可使用: pod 'ZZTools' , 若搜索不到可尝试先使用pod setup.

  3. 好用的话, 记得留下你的小星星哦!

引用


#import "ZZTools.h"

效果展示

Gif较多, 刚开始网页效果比较卡, 可等待网页全部缓冲, 实际效果完美, 也可以直接下载demo运行.

用法简介

ZZLyout使用方法(瀑布流)

建议使用以下方法初始化layou

ZZLayout *layout = [[ZZLayout alloc] initWith:ZZLayoutFlowTypeVertical delegate:self];

以下协议方法根据瀑布流类型调用, 用法详见demo.

/**cell的宽(垂直瀑布流时此协议方法无效, 根据columnNumber和各种间距自适应)*/
- (CGFloat)layout:(ZZLayout *)layout widthForRowAtIndexPath:(NSIndexPath *)indexPath;

/**cell的高(水平瀑布流是此协议方法无效, 根据columnNumber和各种间距自适应)*/
- (CGFloat)layout:(ZZLayout *)layout heightForRowAtIndexPath:(NSIndexPath *)indexPath;

/**每个区多少列(浮动瀑布流时时此协议方法无效)*/
- (NSInteger)layout:(ZZLayout *)layout columnNumberAtSection:(NSInteger)section;

以下协议方法可选择性实现.

/**每个区的边距(上左下右)*/
- (UIEdgeInsets)layout:(ZZLayout *)layout insetForSectionAtIndex:(NSInteger)section;

/**多种类型混合, 暂不支持水平, 可随意兼容垂直和浮动效果*/
- (ZZLayoutFlowType)layout:(ZZLayout *)layout layoutFlowTypeForSectionAtIndex:(NSInteger)section;

/**每个item行间距(如果为水平方向瀑布流, 这里则是左右间距)*/
- (NSInteger)layout:(ZZLayout *)layout lineSpacingForSectionAtIndex:(NSInteger)section;

/**每个item列间距(如果是水平方向瀑布流, 这里则是上下间距)*/
- (CGFloat)layout:(ZZLayout *)layout interitemSpacingForSectionAtIndex:(NSInteger)section;

/**header的size*/
- (CGSize)layout:(ZZLayout *)layout referenceSizeForHeaderInSection:(NSInteger)section;

/**footer的size*/
- (CGSize)layout:(ZZLayout *)layout referenceSizeForFooterInSection:(NSInteger)section;

/**本区区头和上个区区尾的间距*/
- (CGFloat)layout:(ZZLayout *)layout spacingWithLastSectionForSectionAtIndex:(NSInteger)section;

/**指定某个分区的"背景"颜色(从区头, 到区尾的空间, 不包含区头区尾)*/
- (UIColor *)layout:(ZZLayout *)layout colorForSection:(NSInteger)section;

ZZStarView使用方法(星星评价)

请使用以下初始化方法
//starView是一个ZZStarView类型的属性, 请自行实现
self.starView = [[ZZStarView alloc] initWithImage:[UIImage imageNamed:@"star"] selectImage:[UIImage imageNamed:@"didStar"] starWidth:20 starHeight:20 starMargin:5 starCount:5 callBack:^(CGFloat userGrade, CGFloat finalGrade) {
    NSLog(@"用户实际选择分 === %.2f, 最终分 === %.2f", userGrade, finalGrade);
}];
//此view宽高自适应, 设置frame时, 只需考虑q起点xy坐标
[self.view addSubview:self.starView];
self.starView.frame = CGRectMake(50, 150, self.starView.bounds.size.width, self.starView.bounds.size.height);
一些可选的设置
self.starView.sublevel = 0.5;//默认值, 可以不写, 用户可选分值范围是0.5的倍数.(建议在设置分值之前确定此值)
self.starView.grade = [self.params[@"grade1"] floatValue];//设置分值, 可以不写, 默认显示0分.(self.params是UIViewController在ZZRouter中扩展的属性, 包含了所有参数)
self.starView.miniGrade = 0.5;//默认值, 可以不写 ,用户可以设置的最低分值.

特别鸣谢

部分思路来自其他开源库, 侵删, 联系qq:1156858877

特别鸣谢以下开源作者/开源工具

竖向瀑布流: CustomLayout

横向瀑布流: ZZCollectionViewLayout

页面路由: HHRouter

实时FPS: OttoFPSButton

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].