Giter VIP home page Giter VIP logo

zksegment's Introduction

ZKSegment

Build Status license CocoaPods platform platform

ZKSegment 是一个分段选择控件

1

2

3

安装

手动安装

拷贝 ZKSegment/ 目录下的2个文件 ZKSegment.h / ZKSegment.m 到项目里即可。

CocoaPods

pod 'ZKSegment'

快速使用

Objective-C:

#import "ZKSegment.h"

_ZKSegment = [ZKSegment
    zk_segmentWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 45)
                  style:ZKSegmentLineStyle];
_ZKSegment.zk_itemClickBlock=^(NSString *itemName , NSInteger itemIndex){
    NSLog(@"click item:%@",itemName);
    NSLog(@"click itemIndex:%d",itemIndex);
};
[_ZKSegment zk_setItems:@[ @"菜单1", @"菜单2" ]];

[self.view addSubview:_ZKSegment];

自定义

###属性

zk_itemDefaultColor 设置每一项文本默认颜色

zk_itemSelectedColor 设置每一项文本选中颜色

zk_itemStyleSelectedColor 选中项样式颜色

zk_backgroundColor 背景色

运行环境

  • iOS 7+
  • 支持 armv7/armv7s/arm64

zksegment's People

Contributors

wangwenzhuang avatar

Watchers

James Cloos 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.