Coder Social home page Coder Social logo

jyselectview's Introduction

JYSelectView

简介

仅需一行代码就可以完成一个单行选择/多行选择View

用法

添加一个单行选择/多行选择View

//数据源
  NSMutableArray *arr = [NSMutableArray array];
  for (int i = 0; i < 20; i++) {
    [arr addObject:[NSString stringWithFormat:@"数据--%d",i]];
  }

//添加单行选择View
JYSelectView *view = [[JYSelectView alloc]initWithTitleArray:arr
                                                       style:JYSingleSelect
                                                    animated:YES];
[self.view addSubview:view];

单行选择效果图

JYSelectView

带Block且自定义风格的创建方法

//数据源
  NSMutableArray *arr = [NSMutableArray array];
  for (int i = 0; i < 40; i++) {
    [arr addObject:[NSString stringWithFormat:@"数据--%d",i]];
  }

//添加单行选择View
  JYSelectView *view = [[JYSelectView alloc]initWithTitleArray:arr
                                                         style:JYMultipleSelect
                                                      animated:YES
                                             completionHandler:^{
                                               // 点击确定时执行
                                             }];
  view.hintInfo = @"点击您喜爱的几个选项:";
  view.hintInfoColor = [UIColor redColor];
  view.okButtonColor = [UIColor blueColor];
  view.cancelButtonColor = [UIColor redColor];
  [self.view addSubview:view];

多行选择效果图

JYSelectView

有任何问题可以直接issues,或者邮箱联系我。

jyselectview's People

Contributors

job-yang avatar

Stargazers

MohsinAli avatar Alt+ avatar  avatar abc avatar  avatar 本戦 avatar

Watchers

MohsinAli avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.