Git Product home page Git Product logo

sdtextfield's Introduction

SDTextField

诱导输入的输入框
####SDTextField的快速集成


SDTextField使用起来也是比较简单.我们只需要简简单单的两三步就能快速创建SDTextField对象.首先把SDTextFieldDemo中SDTextField.h和SDTextField.m文件拖到你的工程中.

然后使用**+(instancetype)initWithFrame:(CGRect)frame;**创建即可.创建完成之后,我们还需要配置诱导输入查询库数组,然后添加即可.整体代码如下.

    self.textField = [SDTextField initWithFrame:CGRectMake(75, 100, 250, 35)];
    
    self.textField.dataArray = [NSMutableArray arrayWithArray:@[@"a",@"ab",@"A",@"c",@"admin"]];
    
    [self.view addSubview:self.textField];
    

唯一值得注意的,就是高度问题.诱导输入列表的的高度将会是textfield的三倍,如果你需要让列表高度更高或者更低,请自行修改heightMultiple,这个属性将会影响两者的高度比例.用法如下所示.

    self.textField.heightMultiple = 5;

sdtextfield's People

Contributors

wang82426107 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.