OGeek|极客世界-中国程序员成长平台

标题: ios - NIDropDown 菜单查询 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 15:08
标题: ios - NIDropDown 菜单查询

我在一个 View 条中使用 NIDropworn,问题是下拉表正在覆盖我刚刚放置在下拉 View 下方的另一个 View 。

我无法在下拉表中选择和执行任何操作。

有没有办法可以在第二个 View 中添加下拉菜单。 现在下拉菜单出现在小条上。

例如:我在 view1 的页面标题中有下拉菜单。下拉表出现在 view2 的主体上。



Best Answer-推荐答案


您可能没有在 View 中添加 NIDropDown

    - (IBAction)btn_clickid)sender {
    NSArray * arr = [[NSArray alloc] init];
    arr = [NSArray arrayWithObjects"None",@"Name",@"Date",nil];
//    NSArray * arrImage = [[NSArray alloc] init];

    if(dropDown == nil) {
        CGFloat f = 130;
        dropDown = [[NIDropDown alloc]showDropDown:sender :&f :arr :nil "down"];
        dropDown.delegate = self;
        dropDown.userInteractionEnabled=YES;
        [self.viewBelowDD addSubview:dropDown];   // may be missing this line
        [self.viewBelowDD bringSubviewToFront:dropDown];
    }
    else {
        [dropDown hideDropDown:sender];
        [self rel];
    }

}

希望对您有所帮助。如果这不起作用,请告诉我。

关于ios - NIDropDown 菜单查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29964633/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4