Giter Site home page Giter Site logo

jjoptionview's Introduction

JJOptionView

自己封装了一个简单的下拉列表控件以及搜索下拉框

CarouselView in action CarouselView in action

iOS 封装的下拉列表控件,搜索下拉框,会自动识别向上向下展开

JJOptionView *view = [[JJOptionView alloc] initWithFrame:CGRectMake(100, 700, 200, 40)];
view.dataSource = @[@"111",@"222",@"333",@"444",@"555"];
view.selectedBlock = ^(JJOptionView * _Nonnull optionView, NSInteger selectedIndex) {
NSLog(@"%@",optionView);
NSLog(@"%ld",selectedIndex);
};
[self.view addSubview:view];


JJOptionView *view1 = [[JJOptionView alloc] initWithFrame:CGRectMake(100, 300, 200, 40)];
view1.dataSource = @[@"1",@"2",@"3",@"4",@"5"];
view1.delegate = self;
[self.view addSubview:view1];
JJSearchOptionView *view = [[JJSearchOptionView alloc] initWithFrame:CGRectMake(100, 700, 200, 40)];
view.dataSource = @[@"1",@"22",@"213",@"432",@"462",@"872",@"298",@"245",@"20",@"20567"];
view.selectedBlock = ^(JJSearchOptionView * _Nonnull optionView, NSString * _Nonnull selctedString, NSInteger selectedIndex) {

};
[self.view addSubview:view];

JJSearchOptionView *view1 = [[JJSearchOptionView alloc] initWithFrame:CGRectMake(100, 300, 200, 40)];
view1.dataSource = @[@"1",@"22",@"213",@"432",@"462",@"872",@"298",@"245",@"20",@"20567"];
view1.selectedBlock = ^(JJSearchOptionView * _Nonnull optionView, NSString * _Nonnull selctedString, NSInteger selectedIndex) {

};
[self.view addSubview:view1];

jjoptionview's People

Contributors

soulmatel avatar

Watchers

James Cloos avatar yuzhang 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.