Code Monkey home page Code Monkey logo

zjkittool's Introduction

ZJKitTool

Version License Platform

Statement

ZJKitTool 开发快速添加UIKit控件,结合Masonry,以及其他工具类的简单使用,底层的封装.

iOS开发学习交流群

群号:616477537

加群请备注 iOS学习交流

iOS学习交流群

Contact

Author: James Email: [email protected] QQ: 646724452 WeChat: 18819206239

Installation

ZJKitTool is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ZJKitTool'

导入头文件

#import <ZJKitTool.h>

Usage

MVVM模式设计的图文混排评论列表,简单可随意更改的筛选视图,后期会不断完善,以及各个控件的封装,Block回调可以简单快速创建和使用Masonry布局,以及实现方法。还包括许多工具类的封装。 请各位大神多多指教,多多支持点个Star。

快速创建一个按钮,赋给实例的按钮,并实现点击事件:

  self.btn = [UIButton  zj_buttonWithTitle:@"评论列表"
                                  titleColor:kWhiteColor
                                   backColor:kOrangeColor
                                    fontSize:16 isBold:YES
                                cornerRadius:3
                                     supView:self.view constraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(chooseBtn.mas_centerY);
        make.left.equalTo(chooseBtn.mas_right).offset(50);
        make.width.mas_equalTo(100);
        make.height.mas_equalTo(40);
    } touchUp:^(id sender) {
        NSLog(@"这是按钮的点击事件");
    }];
    

快速添加一个带placeholder的UITextView控件,并可以修改颜色

[UITextView zj_textViewWithFontSize:16
                              textColor:kOrangeColor
                            borderColor:k16RGBColor(0xCCCCCC)
                            borderWidth:0.5
                            cornerRadiu:4
                             placeColor:k16RGBColor(0xBBBBBB)
                              placeText:@"请输入..."
                              superView:self.view
                            constraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20);
        make.right.mas_equalTo(-20);
        make.bottom.mas_equalTo(-100);
        make.height.mas_equalTo(180);
    }];

创建一个按钮,并且点击弹出一个地区选择器

[UIButton zj_buttonWithTitle:@"选择地区自定义" titleColor:kLightGrayColor
                       backColor:kWhiteColor fontSize:14 isBold:YES cornerRadius:4
                         supView:self.view constraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(lab3.mas_centerY);
        make.left.equalTo(lab3.mas_right).offset(30);
        make.width.mas_equalTo(140);
        make.height.mas_equalTo(35);
    } touchUp:^(id sender) {
        
        [ZJAddressPickerView zj_showAddressPickerWithShowType:ZJAddressPickerModeArea
                                                   dataSource:nil
                                              defaultSelected:nil
                                                 isAutoSelect:YES
                                                    lineColor:[UIColor redColor]
                                           selectRowTextColor:[UIColor orangeColor]
                                             selectRowBGColor:kRGBColor(230, 230, 230)
                                         confirmBtnTitleColor:kRGBColor(116, 80, 200)
                                          cancelBtnTitleColor:kRGBColor(116, 80, 200)
                                                    rowHeight:50.0
                                                  resultBlock:^(ZJProvinceModel *province, ZJCityModel *city, ZJAreaModel *area) {
                                                      lab3.text = [NSString stringWithFormat:@"%@-%@-%@",province.name,city.name,area.name];
                                                  } cancelBlock:^{
                                                      
                                                  }];
    }];
    

在评论列表中浏览图片推荐使用 KSPhotoBrowser 第三方库浏览

/*

  • 使用 KSPhotoBrowser 浏览图片
  • 使用cocoaPods 导入
  • pod 'KSPhotoBrowser'

 */

 

MVVM评论列表 Masonry自动布局简单朋友圈

 

倒计时列表 WKWebView与 JS交互

瀑布流

横向布局 垂直布局

ZJPickerView 自定义日期时间、地区选择器,可以自定义数据,修改选择中行的文字颜色,背景颜色,按钮颜色,自动选择等等。

时间选择器 地区选择器

License

ZJKitTool is released under the MIT license. See LICENSE for details.

 

zjkittool's People

Contributors

dzhijian avatar

Watchers

 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.