Latest 0.0.2
Homepage https://github.com/XueYangLee/NumberCalculate
License MIT
Platforms ios 8.0, requires ARC
Authors

用于购物车或者商品货物添加以更改数量使用

主要参数

/** 初始显示值 不传默认显示0  建议必传*/
@property (nonatomic, copy) NSString *baseNum;

/** 数值增减基数(倍数增减) 默认1的倍数增减 */
@property (nonatomic, assign) NSInteger multipleNum;

/** 最小值 默认且最小为0*/
@property (nonatomic, assign) NSInteger minNum;

/** 最大值  默认99999 */
@property (nonatomic, assign) NSInteger maxNum;

/** 数字框是否可以手动输入  默认可以 */
@property (nonatomic, assign) BOOL canText;

/** 是否隐藏边框线  默认显示 */
@property (nonatomic, assign) BOOL hidBorder;

/** 边框线颜色 */
@property (nonatomic, strong) UIColor *numborderColor;

/** 加减按钮颜色 */
@property (nonatomic, strong) UIColor *buttonColor;

/** 是否开启晃动  默认开启 */
@property (nonatomic, assign) BOOL isShake;

回调方式block跟delegate两种方式可选

/** 结果回传 */
@property (nonatomic, copy) void (^resultNumber)(NSString *number);
@property (nonatomic, weak) id<NumberCalculateDelegate>delegate;
number.resultNumber = ^(NSString *number) {
NSLog(@"%@>>>resultBlock>>",number);
};

- (void)resultNumber:(NSString *)number{
NSLog(@"%@>>>resultDelegate>>",number);
}

参考

Latest podspec

{
    "name": "NumberCalculate",
    "version": "0.0.2",
    "summary": "u6570u503cu52a0u51cfu5c0fu63a7u4ef6",
    "homepage": "https://github.com/XueYangLee/NumberCalculate",
    "license": "MIT",
    "authors": {
        "Singularity_Lee": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/XueYangLee/NumberCalculate.git",
        "tag": "0.0.2"
    },
    "source_files": "NumberCalculate/NumberCalculate/*.{h,m}",
    "resources": "NumberCalculate/NumberCalculate/resource/*.png",
    "requires_arc": true
}

Pin It on Pinterest

Share This