3 Star 0 Fork 0

Gitee 极速下载 / BROptionsButton

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/BasheerSience/BROptionsButton
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

The Library currently is not supported⛔️

BROptionsButton

Amazing options button for your UITabBar, with very beautiful dynamic animation. Pimp your tabBar with beautiful button.

  • You saw Yelp® app and impressed by the central button animtaion ?
  • Now you can have even better aniamation and feel by using BROptionsButton. BROptionsButton uses the power of UIDynamics to make animation very realastic and beautiful.

What's new in Version 1.3

  1. iOS 8 support
  2. iPhone 6 and 6+ support
  3. Less dependency on screen sizes, so now it works with all devices
  4. change damping and frequency of the animation on the go
  5. change the location of the button dynamically with/without animation
left Specifications: =============== 1) You can add BrOptionsButton at any index in your tabBar
left| center| right
2) You can have from 1 option button up to 7 for iPhone
left| center| right
3) Choose your own custom images and colors
4) Dynamically change the number of items, background color, titles, and the location of the button

What will you need:

  1. iOS 7 or later
  2. instance of UItabBar (of course)

How to use it:

  • import BROptionsButton.h
#import "BROptionsButton.h"
  • Initialize new button
// the index 1 is the center for UITabBar with 3 buttons
// the delegate must be setted  
 BROptionsButton *brOption = [[BROptionsButton alloc] initForTabBar:self.tabBar forItemIndex:1 delegate:self];
  • Customize the button. Set images for different states
[brOption setImage:[UIImage imageNamed:@"Apple"] forBROptionsButtonState:BROptionsButtonStateNormal];
[brOption setImage:[UIImage imageNamed:@"close"] forBROptionsButtonState:BROptionsButtonStateOpened];
  • Respond to the formal protocol messages
// number of items 
- (NSInteger)brOptionsButtonNumberOfItems:(BROptionsButton *)brOptionsButton
{
    return 4;
}

// respond to selection (show viewController, animation, alert...)
- (void)brOptionsButton:(BROptionsButton *)brOptionsButton didSelectItem:(BROptionItem *)item
{
    [self setSelectedIndex:brOptionsButton.locationIndexInTabBar];
}
  • Respond to informal protocol messages to have more customizations
// custom image for this item.
// nil will make rounded button with default background color
- (UIImage*)brOptionsButton:(BROptionsButton *)brOptionsButton imageForItemAtIndex:(NSInteger)index
{
    UIImage *image = [UIImage imageNamed:@"Apple"];
    return image;
}

// do any setups before displaying the button
- (void)brOptionsButton:(BROptionsButton*)optionsButton willDisplayButtonItem:(BROptionItem*)button {
    button.backgroundColor = [UIColor blackColor];
}


- (NSString*)brOptionsButton:(BROptionsButton*)brOptionsButton titleForItemAtIndex:(NSInteger)index {
   return @"buttonTitle";
}

Next:

Stay tuned, more cool stuff and updates comming soon, click Watch to get the latest updates for this library

Lincense:

Copyright (c) 2013 Basheer Malaa

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The MIT License (MIT) Copyright (c) 2014 Basheer Malaa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

BROptionsButton 是个非常棒的 UITabBar 选项按钮,有着非常漂亮的动画效果 展开 收起
Objective-C
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Objective-C
1
https://gitee.com/mirrors/BROptionsButton.git
git@gitee.com:mirrors/BROptionsButton.git
mirrors
BROptionsButton
BROptionsButton
master

搜索帮助