美文网首页
弹出标签

弹出标签

作者: CGX_鑫 | 来源:发表于2020-07-25 17:04 被阅读0次

    一、弹出标签,已经支持pod下载 ,请更新pod版本库
    最新版本:0.0.2
    OC版本:

            pod搜索:pod search CGXCategoryPopTitleView-OC
    
            如果搜不到去请搜索:pod search CGXCategoryPopTitleView-OC --simple
    
            git链接:https://github.com/974794055/CGXCategoryPopTitleView-OC.git
    

    二、使用说明

    1、界面创建

    NSMutableArray *arr1 = [[NSMutableArray alloc] initWithObjects:@"要闻",@"河北",@"财经",@"娱乐",@"体育",@"社会",@"NBA",@"视频",@"汽车",@"图片",@"科技",@"军事",@"国际",@"数码",@"星座",@"电影",@"时尚",@"文化",@"游戏",@"教育",@"动漫",@"政务",@"纪录片",@"房产",@"佛学",@"股票",@"理财",@"有声",@"家居",@"电竞",@"美容",@"电视剧",@"搏击",@"健康",@"摄影",@"生活",@"旅游",@"韩流",@"探索",@"综艺",@"美食",@"育儿",@"红烧全部", @"麻辣龙虾", @"美味便宜好货", @"胡萝卜", @"清甜生活", @"母婴", @"美味香蕉", @"时尚", @"麻辣干锅", @"剁椒鱼头", @"鸳鸯火锅", nil];
        
        NSMutableArray *dataArr= [NSMutableArray array];
        for (int i = 0; i<arr1.count; i++) {
            CGXCategoryPopTitleCellModel *model = [[CGXCategoryPopTitleCellModel alloc] init];
            model.title = arr1[i];
            [dataArr addObject:model];
        }
        CGXCategoryPopTitleView *popView = [CGXCategoryPopTitleView sharedSingleton];
        popView.isAdaptive = NO;
        popView.rowHeight = 40;
        popView.topSpace = [[UIApplication sharedApplication] statusBarFrame].size.height+44.0;;
        popView.row = 3;
        popView.insets = UIEdgeInsetsMake(10, 10, 10, 10);
        popView.minimumInteritemSpacing = 10;
        popView.minimumLineSpacing = 10;
        [popView showPopViewArray:dataArr SelectBlock:^(CGXCategoryPopTitleCellModel * _Nonnull model) {
            NSLog(@"channels--%@" , model.title);
            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                [popView dismissPopView];
            });
        }];
        [popView showUpdateCellShowBlock:^(CGXCategoryPopTitleCell * _Nonnull cell) {
           NSLog(@"cell--%@" , cell);
            cell.titleLabel.backgroundColor = [UIColor whiteColor];
        }];
    

    2、效果图


    Simulator Screen Shot - iPhone 11 Pro Max - 2020-07-25 at 16.53.41.png

    3、将不断更新更多效果 ,敬请期待!!!

    相关文章

      网友评论

          本文标题:弹出标签

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