Coder Social home page Coder Social logo

dtkdropdownmenu's Introduction

DTKDropdownMenu

对题库通用下拉菜单

公司项目中通用下拉菜单集成,参考了KTDropdownMenuView,在理清思路和需求后完成了DTKDropdownMenu,感谢

因为产品需求(你懂的),很多无用点击后续优化处理掉,希望可以把这个框架做到通用,有什么问题希望可以和大家一起交流

用法

支持cocoapods

DTKDropdownMenu pod 'DTKDropdownMenu', '~> 0.0.4'

或者导入文件夹DTKDropdownMenuView到工程中
__weak typeof(self) weakSelf = self;
DTKDropdownItem *item0 = [DTKDropdownItem itemWithTitle:@"rightItem0" iconName:@"DTK_jiangbei" callBack:^(NSUInteger index, id info) {
    NSLog(@"rightItem%lu",(unsigned long)index);
    [weakSelf push];
}];
DTKDropdownItem *item1 = [DTKDropdownItem itemWithTitle:@"rightItem1" iconName:@"DTK_renwu" callBack:^(NSUInteger index, id info) {
    NSLog(@"rightItem%lu",(unsigned long)index);
    [weakSelf push];
}];
DTKDropdownItem *item2 = [DTKDropdownItem itemWithTitle:@"rightItem2" iconName:@"DTK_update" callBack:^(NSUInteger index, id info) {
    NSLog(@"rightItem%lu",(unsigned long)index);
    [weakSelf push];
}];
DTKDropdownItem *item3 = [DTKDropdownItem itemWithTitle:@"rightItem3" iconName:@"DTK_xiaoxi" callBack:^(NSUInteger index, id info) {
    NSLog(@"rightItem%lu",(unsigned long)index);
    [weakSelf push];
}];
DTKDropdownMenuView *menuView = [DTKDropdownMenuView dropdownMenuViewWithType:dropDownTypeRightItem frame:CGRectMake(0, 0, 44.f, 44.f) dropdownItems:@[item0,item1,item2,item3] icon:@"DTK_bi"];
menuView.dropWidth = 150.f;
menuView.titleFont = [UIFont systemFontOfSize:18.f];
menuView.textColor = ColorWithRGB(102.f, 102.f, 102.f);
menuView.textFont = [UIFont systemFontOfSize:13.f];
menuView.cellSeparatorColor = ColorWithRGB(229.f, 229.f, 229.f);
menuView.textFont = [UIFont systemFontOfSize:14.f];
menuView.animationDuration = 0.2f;
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:menuView];

dtkdropdownmenu's People

Contributors

arcangelw avatar bryant1410 avatar

Watchers

 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.