Latest 1.0.0
Homepage https://github.com/LongJiangSB/ChooseAndSearchView
License MIT
Platforms ios 7.0, requires ARC
Frameworks UIKit
Authors

模仿安卓中自带的选择框(Spinner)。
使用时必须将该View置于父视图的最顶层,才不会被其他控件挡住。

image
Installation with CocoaPods

    pod 'ChooseAndSearchView'

Usage

    #import "SeachAndChooseView.h"

vc.m

    NSArray *nationalityArr = @[@"中国",@"英国",@"美国",@"法国",@"英格兰",@"意大利",@"伊拉克",@"新加坡",@"泰国",@"德国"];

    SeachAndChooseView *searchV = [SeachAndChooseView initSearchView];
    searchV.frame = CGRectMake(15, 20, self.view.frame.size.width-30, 82);
    searchV.titleLabel.text = @"请选择你的国籍";

    NSMutableArray *array1 = [NSMutableArray array];
    for (int i=0; i<nationalityArr.count; i++) {
        SearchInfo *sInfo = [[SearchInfo alloc] init];
        sInfo.sID = [NSString stringWithFormat:@"%d",i+1];
        sInfo.sName = nationalityArr[i];
        [array1 addObject:sInfo];
    }

    searchV.allTableArr = array1;
    [self.view addSubview:searchV];

Latest podspec

{
    "name": "ChooseAndSearchView",
    "version": "1.0.0",
    "summary": "u6a21u4effu5b89u5353u4e2du81eau5e26u7684u9009u62e9u6846uff08Spinneruff09u3002",
    "homepage": "https://github.com/LongJiangSB/ChooseAndSearchView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Long Jiang": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/LongJiangSB/ChooseAndSearchView.git",
        "tag": "1.0.0"
    },
    "frameworks": "UIKit",
    "source_files": "SearchAndChooseView/*.{h,m}",
    "resources": "SearchAndChooseView/**",
    "requires_arc": true
}

Pin It on Pinterest

Share This