美文网首页
PickerView 单列下拉列表的快速创建

PickerView 单列下拉列表的快速创建

作者: 不要虚度美好的时光 | 来源:发表于2021-08-13 15:24 被阅读0次

使用GitHub上第三方库:https://github.com/houdangdang/PickerView
导入头文件:

import "HDPickerView.h"

    NSMutableArray *dataSource = [@[@"中国工商银行",
                                    @"中国农业银行",
                                    @"中国银行",
                                    @"中国光大银行",
                                    @"广东发展银行",
                                    @"平安银行",
                                    @"中国民生银行",
                                    @"交通银行",
                                    @"中国建设银行",
                                    @"兴业银行",
                                    @"华夏银行"] mutableCopy];
    [[[HDPickerView alloc] initPickerViewWithDataSource:dataSource
                                            selectVaule:^(NSString *value, NSInteger component, NSInteger row) {
        [self.showDropListBtn setTitle:value forState:UIControlStateNormal];
    }] show];

相关文章

网友评论

      本文标题:PickerView 单列下拉列表的快速创建

      本文链接:https://www.haomeiwen.com/subject/dondbltx.html