Giter VIP home page Giter VIP logo

thcombobox's Introduction

THComboBox

An IBDesignable custom combobox control for iOS. The text font can resize adaptively.

Installation

pod 'THComboBox'

Attention:IBDesignable doesn't work with static libraries in Xcode now. Probably you'll meet this problem. Maybe this bug will be fixed in the future. But now you'd better install it from source.

From source

  • Drag the THComboBox/ folder to your project
  • #import "THComboBox.h"

How To Use

With Storyboards or Xib

Create a UIView and change its class to THComboBox

Open the Attribute Inspector, and customize the properties:

Give the listItems and set the delegate:

self.comboBox1.listItems = @[@"主楼",@"学堂",@"文图",@"东门"];
self.delegate = self;		//let the viewcontroller implement ComboBoxDelegate

Create programmatically

Very easy like this:

THComboBox *comboBox2 = [[THComboBox alloc] initWithFrame:CGRectMake(200, 400, 210, 60)];
self.comboBox2.listItems = @[@"ob-c",@"java",@"c#",@"c++"];
self.delegate = self;		//let the viewcontroller implement ComboBoxDelegate

Then change the settings programmatically.

thcombobox's People

Contributors

wujy07 avatar techinpark2 avatar

Stargazers

isaac_gang avatar  avatar  avatar IsLand avatar  avatar 王子龙 avatar  avatar

Watchers

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