Latest 1.0.1
Homepage https://github.com/wujy07/THComboBox
License MIT
Platforms ios 7.0, requires ARC
Frameworks XCTest
Authors

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

THComboBox

Installation

From CocoaPods

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

THComboBox
THComboBox

Open the Attribute Inspector, and customize the properties:

THComboBox

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.

Latest podspec

{
    "name": "THComboBox",
    "version": "1.0.1",
    "summary": "an IBDesignable custom combobox control for iOS",
    "description": "                   A longer description of THComboBox in Markdown format.nn                   * Think: Why did you write this? What is the focus? What does it do?n                   * CocoaPods will be using this to generate tags, and improve search results.n                   * Try to keep it short, snappy and to the point.n                   * Finally, don't worry about the indent, CocoaPods strips it!n",
    "homepage": "https://github.com/wujy07/THComboBox",
    "license": "MIT",
    "authors": {
        "wujy07": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/wujy07/THComboBox.git",
        "tag": "1.0.1"
    },
    "source_files": [
        "THComboBox",
        "THComboBox/**/*.{h,m}"
    ],
    "exclude_files": "Classes/Exclude",
    "frameworks": "XCTest",
    "requires_arc": true
}

Pin It on Pinterest

Share This