Git Product home page Git Product logo

wrcellview's Introduction

WRCellView

自定义View,类似tableView的系统cell,使用方便

iOS 技术交流

我创建了一个 微信 iOS 技术交流群,欢迎小伙伴们加入一起交流学习~

可以加我微信我拉你进去(备注iOS),我的微信号 wr1204607318

0️⃣. Demo

image image image image

1️⃣. Installation 安装

手动拖入 将 WRCellView 文件夹拽入项目中,导入头文件:#import "WRCellView.h"

2️⃣. How To Use 使用

**1.以下是常用的style **

/**
左侧 icon label  右侧 icon  label indicator
0x   1    1          1     1       1

按位与运算 按位与运算符"&"是双目运算符。其功能是参与运算的两数各对应的二进位相与。只有对应的两个二进位均为1时,结果位才为1 ,否则为0。参与运算的数以补码方式出现。
例如:9 & 5 可写算式如下: 00001001 & 00000101 = 00000001; 可见 9 & 5 = 1。
*/
typedef NS_ENUM(NSInteger, WRCellStyle)
{   // 以下列举的都是常用的
    WRCellStyle_Label                   = 0x10,
    WRCellStyleLabel_                   = 0x1000,
    WRCellStyleLabel_Indicator          = 0x1001,
    WRCellStyleLabel_IconLabelIndicator = 0x1111,
    WRCellStyleLabel_LabelIndicator     = 0x1011,
    WRCellStyleLabel_Label              = 0x1010,
    WRCellStyleLabel_Icon               = 0x1100,
    WRCellStyleLabel_IconIndicator      = 0x1101,
    WRCellStyleIcon_Indicator           = 0x10001,
    WRCellStyleIconLabel_Indicator      = 0x11001,
    WRCellStyleIconLabel_Icon           = 0x11100,
    WRCellStyleIconLabel_LabelIndicator = 0x11011,
};

2. 接口

- (instancetype)initWithFrame:(CGRect)frame lineStyle:(WRCellStyle)style;
- (instancetype)initWithLineStyle:(WRCellStyle)style;
/** 设置底部的那条线距左边为0 */
- (void)setLineStyleWithLeftZero;
/** 设置底部的那条线与label的左侧对齐 */
- (void)setLineStyleWithLeftEqualLabelLeft;
/** 设置隐藏底部的那条线 */
- (void)setHideBottomLine:(BOOL)hideBottomLine;
/** 显示上面的横线,默认不显示 */
- (void)setShowTopLine:(BOOL)showTopLine;
/** 设置自己不可以点击 */
- (void)setCanNotSelected;

3. 举例说明

- (WRCellView *)signView {
    if (_signView == nil) {
        _signView = [[WRCellView alloc] initWithLineStyle:WRCellStyleLabel_LabelIndicator];
        _signView.leftLabel.text = @"个性签名";
        _signView.rightLabel.text = @"爱别人的同事也是爱自己";
        [_signView setLineStyleWithLeftZero];
    }
    return _signView;
}

3️⃣. More 更多

If you find a bug, please create a issue.
Welcome to pull requests.
More infomation please view code.
如果你发现了bug,请提一个issue。
欢迎给我提pull requests。
更多信息详见代码,也可查看我的简书: 我的简书

最近更新: 2017.05.04 16:18

  1. 添加自定义view Demo 2. 设置不可点击接口

4️⃣. 联系我

扫码回复1获取面试资料(持续更新)

你觉得对你有所帮助的话,请献上宝贵的Star!!! 不胜感激!!!

wrcellview's People

Contributors

wangrui460 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wrcellview's Issues

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.