Git Product home page Git Product logo

xzmtabbarextension's Introduction

XZMTabbarExtension

tabBar工具条框架 (适应各种APP风格,集成只需几行代码,没有耦合度)

(logo)

##动态工具条

/** 创建自定义tabbar */
XZMTabbarExtension *tabBar = [[XZMTabbarExtension alloc] init];
tabBar.backgroundColor = [UIColor whiteColor];
tabBar.frame = self.tabBar.bounds;
/** 传递模型数组 */
tabBar.items = self.itemArray;
[tabBar xzm_setShadeItemBackgroundColor:[UIColor cyanColor]];
/** 设置代理 */
tabBar.delegate = self;
[self.tabBar addSubview:tabBar];

/** 代理方法 */
- (void)xzm_tabBar:(XZMTabbarExtension *)tabBar didSelectItem:(NSInteger)index{
self.selectedIndex = index;
}

##个性化中间按钮

  • 使用框架的UITabBar扩展方法即可
/** 配置中间按钮 */
[self.tabBar setUpTabBarCenterButton:^(UIButton *centerButton) {
[centerButton setBackgroundImage:[UIImage imageNamed:@"tabBar_publish_icon"] forState:UIControlStateNormal];

[centerButton setBackgroundImage:[UIImage imageNamed:@"tabBar_publish_click_icon"] forState:UIControlStateSelected];

[centerButton addTarget:self action:@selector(chickCenterButton) forControlEvents:UIControlEventTouchUpInside];
}];


- (void)chickCenterButton
{
NSLog(@"点击了中间按钮");
[self presentViewController:[[XZMPublishViewController alloc] init] animated:NO completion:nil];
}

特性说明:

###1.集成简单,使用方便,没有耦合度 ###2.支持block回调。 ###3.喜欢你就Star一下吧,感谢你的支持!

xzmtabbarextension's People

Contributors

xiezhongmin avatar

Watchers

 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.