Open ZachGuoMingyu opened 5 years ago
正常来说你每次点击button都会响应 1.查看你的button响应事件 2.configuration.titles = [configuration creaFilterDropMenuData]; 你选择构造这种模型是侧边弹出的菜单,只有点击的时候可以弹出,弹出后button是被覆盖在蒙版后面的,是点不到的
正常来说你每次点击button都会响应 1.查看你的button响应事件 2.configuration.titles = [configuration creaFilterDropMenuData]; 你选择构造这种模型是侧边弹出的菜单,只有点击的时候可以弹出,弹出后button是被覆盖在蒙版后面的,是点不到的
那怎么才能在button的点击事件里获取到筛选菜单收回的方法?
正常来说你每次点击button都会响应 1.查看你的button响应事件 2.configuration.titles = [configuration creaFilterDropMenuData]; 你选择构造这种模型是侧边弹出的菜单,只有点击的时候可以弹出,弹出后button是被覆盖在蒙版后面的,是点不到的
能否在外部也能调用dismiss方法,我尝试了一下没有效果,点击不能收回
(void)viewDidLoad {
[super viewDidLoad]; UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(100, 700, 60, 30)]; [btn setBackgroundColor:[UIColor blueColor]]; [btn addTarget:self action:@selector(clickItem) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:btn]; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"筛选" style:UIBarButtonItemStylePlain target:self action:@selector(clickItem)]; }
(void)clickItem { NSLog(@"1"); GHDropMenuModel *configuration = [[GHDropMenuModel alloc]init];
configuration.titles = [configuration creaFilterDropMenuData]; /* 配置筛选菜单是否记录用户选中 默认NO / configuration.recordSeleted = NO;
weakself(self); GHDropMenu dropMenu = [GHDropMenu creatDropFilterMenuWidthConfiguration:configuration dropMenuTagArrayBlock:^(NSArray _Nonnull tagArray) { [weakSelf getStrWith:tagArray];
}]; dropMenu.titleSeletedImageName = @"up_normal"; dropMenu.titleNormalImageName = @"down_normal"; dropMenu.delegate = self; dropMenu.durationTime = 0.5; self.dropMenu = dropMenu; [dropMenu show];
}