zoukankan      html  css  js  c++  java
  • iOS 自定义分段选择器

     

    UIFont *titleFont = [UIFont systemFontOfSize:13];

    // 状态1 

    TKSegementedItemStatus *compositeNormal = [TKSegementedItemStatus statusWithTitle:@"综合" titleColor:[UIColor blackColor] titleFont:titleFont image:nil backgroundImage:nil becomeCurrentStatusBlock:^{
            NSLog(@"综合默认状态");
        }];

     

    // 状态2

    TKSegementedItemStatus *compositeSelected = [TKSegementedItemStatus statusWithTitle:@"综合" titleColor:[UIColor redColor] titleFont:titleFont image:nil backgroundImage:nil becomeCurrentStatusBlock:^{
            NSLog(@"综合刚刚被选中");
        }];

     

    // 状态3

    TKSegementedItemStatus *compositeOthers = [TKSegementedItemStatus statusWithTitle:@"综合" titleColor:[UIColor green] titleFont:titleFont image:nil backgroundImage:image3 becomeCurrentStatusBlock:^{
            NSLog(@"价格降序状态");
        }];

     

    TKSegementedItem *compositeItem = [TKSegementedItem itemWithNormalStatus:compositeNormal selectedStatus:compositeSelected otherStatus:compositeOthers];

    TKSegementedView *segementedView = [TKSegementedView segementedViewWithSegementedItem:compositeItem, volumeItem, priceItem, filterItem, nil];

     

    segementedView.frame = CGRectMake(0, 64, self.view.bounds.size.width, 35);

    segementedView.verticalDividerInset = UIEdgeInsetsMake(10, 0, 10, 0);

    [self.view addSubview:segementedView];

     

    https://github.com/tomatoK/TKSegementedView

  • 相关阅读:
    MySQL8.0.11 组复制配置
    Replication主要配置项
    MySQL最优配置模板( 5.6&5.7转)
    MySQL group replication介绍
    保证复制高可用的一些重要参数
    数据库规约解读
    线上MYSQL同步报错故障处理方法总结
    MySQL 5.7 并行复制
    MySQL的nnodb引擎表数据分区存储
    shell综合
  • 原文地址:https://www.cnblogs.com/oumygade/p/4716801.html
Copyright © 2011-2022 走看看