Latest 0.1.1
Homepage https://github.com/zczczyc/ZCDropdownList
License MIT
Platforms ios 8.0
Dependencies ZCTableViewAnimationKit
Authors

ZCDropdownList

图片

引入项目:

一:

pod 'ZCDropdownList', '~> 0.1.1'

二:

#import "ZCDropdownListView.h"

三:


#define kScreenHeight [UIScreen mainScreen].bounds.size.height
#define kScreenWidth [UIScreen mainScreen].bounds.size.width

    ZCDropdownListItem *item1 = [[ZCDropdownListItem alloc] initWithItem:@"1" itemName:@"到手价"];
    ZCDropdownListItem *item2 = [[ZCDropdownListItem alloc] initWithItem:@"2" itemName:@"返利最高"];
    ZCDropdownListItem *item3 = [[ZCDropdownListItem alloc] initWithItem:@"3" itemName:@"返利最低"];
    NSArray *select1Array = @[item1,item2,item3];

    ZCDropdownListView *dropdownListView = [[ZCDropdownListView alloc] initWithDataSource:select1Array withType:2];
    dropdownListView.frame = CGRectMake(0, 200, kScreenWidth/3, 30);
    dropdownListView.selectedIndex = 0;
    //    dropdownListView.categoryName = @"分类";
    [dropdownListView setViewBorder:0.5 borderColor:[UIColor grayColor] cornerRadius:2];
    [self.view addSubview:dropdownListView];

    [dropdownListView setDropdownListViewSelectedBlock:^(ZCDropdownListView *dropdownListView) {
        NSString *msgString = [NSString stringWithFormat:
                               @"selected name:%@  id:%@"
                               , dropdownListView.selectedItem.itemName
                               , dropdownListView.selectedItem.itemId];

        NSLog(@"%@",msgString);
    }];

Latest podspec

{
    "name": "ZCDropdownList",
    "version": "0.1.1",
    "summary": "A short description of ZCDropdownList.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/zczczyc/ZCDropdownList",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "zczczyc": "gitzczyc"
    },
    "source": {
        "git": "https://github.com/zczczyc/ZCDropdownList.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "ZCDropdownList/Classes/**/*",
    "dependencies": {
        "ZCTableViewAnimationKit": [
            "~> 0.1.0"
        ]
    },
    "resources": [
        "ZCDropdownList/Classes/ZCDropdownList.bundle"
    ]
}

Pin It on Pinterest

Share This