Skip to content

ruanqiaohua/BackPickView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Image

- (void)viewDidLoad {
    [super viewDidLoad];

    // 代码创建button
    _titleBtn = [ZQPickViewController arrowButtonWithTitle:@"Test1" frame:CGRectMake(100, 200, 120, 50)];
    [self.view addSubview:_titleBtn];
    [_titleBtn addTarget:self action:@selector(showPickView:) forControlEvents:UIControlEventTouchUpInside];
    // xib创建button
    [ZQPickViewController addArrowImageView:_titleBtn1];
    [_titleBtn1 addTarget:self action:@selector(showPickView:) forControlEvents:UIControlEventTouchUpInside];
}

- (void)showPickView:(UIButton *)sender {
    
    NSArray *titleList = @[@"Test1",@"Test2",@"Test3",@"Test4",@"Test5"];
    ZQPickViewController *vc = [ZQPickViewController initWithTitleButton:sender titleList:titleList];
    [vc selectedCallBack:^(ZQPickViewController *pickViewController, NSInteger index) {
        [sender setTitle:titleList[index] forState:UIControlStateNormal];
        [pickViewController hidden];
    }];
    [vc show];
}

About

点击按钮从底部出来列表

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published