BROptionsButton
BROptionsButton copied to clipboard
Amazing options button for your UITabBar, with very beautiful dynamic animation. Pimp your tabBar
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
- iOS 8 support
- iPhone 6 and 6+ support
- Less dependency on screen sizes, so now it works with all devices
- change damping and frequency of the animation on the go
- change the location of the button dynamically with/without animation
![left](https://raw.githubusercontent.com/BasheerSience/BROptionsButton/master/videoDemo_gif.gif)
![left](https://raw.githubusercontent.com/BasheerSience/BROptionsButton/master/screenShot_anyLocation/iOS%20Simulator%20Screen%20shot%20Mar%2024,%202014,%206.47.47%20PM.png)
![center](https://raw.githubusercontent.com/BasheerSience/BROptionsButton/master/screenShot_anyLocation/iOS%20Simulator%20Screen%20shot%20Mar%2024,%202014,%205.17.42%20PM.png)
![right](https://raw.githubusercontent.com/BasheerSience/BROptionsButton/master/screenShot_anyLocation/iOS%20Simulator%20Screen%20shot%20Mar%2024,%202014,%206.48.01%20PM.png)
2) You can have from 1 option button up to 7 for iPhone
![left](https://raw.githubusercontent.com/BasheerSience/BROptionsButton/master/screenShot-numberOfOptions/iOS%20Simulator%20Screen%20shot%20Mar%2024,%202014,%206.49.30%20PM.png)
![center](https://raw.githubusercontent.com/BasheerSience/BROptionsButton/master/screenShot-numberOfOptions/iOS%20Simulator%20Screen%20shot%20Mar%2024,%202014,%206.49.43%20PM.png)
![right](https://raw.githubusercontent.com/BasheerSience/BROptionsButton/master/screenShot-numberOfOptions/iOS%20Simulator%20Screen%20shot%20Mar%2024,%202014,%206.49.50%20PM.png)
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:
- iOS 7 or later
- 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.