Giter Site home page Giter Site logo

methodchainintextention_ytc's Introduction

框架目的: 将普通的多行方法以及中括号语法转换为点语法进行调用, 主要目的是为了减少创建UI的代码量, 使得代码更加集中, 可读性更好.

主要文件: 使用的时候直接将 tcLinkLibiary/tcUICategory 文件夹拖出即可,等版本完善之后会加入CocoPods.

使用范例:

//新创建一个UIImageView并对frame等进行_赋值_添加手势_将自己添加进父视图 //推荐第一个调用 tc_frame 进行尺寸赋值,最后一个调用 tc_SuperView 将自己添加进父视图

UIImageView *imgV = [UIImageView tc_InitWithBlock:^(UIImageView *imgView) { imgView.tc_BGColorEnum(tcColor_Rand0m).tc_Gestrure(GestureType_Tap,self,@selector(Taplalalalla:)).tc_FrameValue(50,50,100,100).tc_Tag(20).tc_SuperView(self.view); }];

//当然,也可以拆开进行使用,此类库接口和系统的接口可以混用

UILabel *firT = [[UILabel alloc]init]; [self.view addSubview:firT]; firT.setText(@"label").setTextColor([UIColor brownColor]).setFontSize(30).setFrame(20,20,200,50).setAlign(NSTextAlignmentCenter);

V1.1 稳定版

  • 常用控件的常用属性改造已经基本完成,接口已经稳定,可以放心使用.

  • 因为需要和系统接口进行区分,因此前缀采用了特殊缩写.

  • 增加了快速创建六种手势的接口,可以一句话创建一个手势并添加.

  • 增加了快速创建背景色,两种方式,一种通过自己创建颜色,一种直接使用枚举更加便捷.

  • 增加了frame的两种设置方式,可以选择传入结构体,也可以直接传入四个值

  • 增加了直接将自身加入父视图的接口,推荐最后一个方法调用

methodchainintextention_ytc's People

Contributors

yangtianci avatar

Watchers

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