bfeher / bfpapertabbarcontroller Goto Github PK
View Code? Open in Web Editor NEWiOS UITabBar (controller) inspired by Google's Paper Material Design.
License: MIT License
iOS UITabBar (controller) inspired by Google's Paper Material Design.
License: MIT License
The tabBar property UITabBarItemPositioning has a default value of UITabBarItemPositioningAutomatic
and this value change the itemSpacing of UITabBarItems in the tabBar on the iPad, making the items centered and no longer evenly distributed along the tabBar width.
One possible solution is changing the value UITabBarItemPositioningAutomatic for UITabBarItemPositioningFill.
self.tabBar.itemPositioning = UITabBarItemPositioningFill;
hello ,
when add arabic localization all item start from right to left , so when I tap on last item is selected first item, also when I tap item 4 is selected item 2
Hi,
I really like the bFPaperTabBarController. I tried using it in a project and noticed my view controller that extends the BFPaperTabBarController is called twice.
I checked with the demo that is provide with the source code: DemoTabBarController. There the same happens.
Is there any way to prevent this? Allocating the controller twice seems a bug to me.
Regards,
Rudie.
In my app sometimes this variable returns nil when the user fast switch between views, i could not reproduce the problem in the demo app, and since my views do some heavy work when loading a think it may have something to do with that process.
I made a simple change in the burstTapCircle method, just add a nil check and it seem to solve the my problem and didn't change any behavior in the component
if (tapCircle != nil) {
[self.deathRowForCircleLayers addObject:tapCircle];
CGPathRef startingPath = tapCircle.path;
CGFloat startingOpacity = tapCircle.opacity;
if ([[tapCircle animationKeys] count] > 0) {
startingPath = [[tapCircle presentationLayer] path];
startingOpacity = [[tapCircle presentationLayer] opacity];
}
// Burst tap-circle:
CABasicAnimation *tapCircleGrowthAnimation = [CABasicAnimation animationWithKeyPath:@"path"];
tapCircleGrowthAnimation.duration = self.touchUpAnimationDuration;
tapCircleGrowthAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
tapCircleGrowthAnimation.fromValue = (__bridge id)startingPath;
tapCircleGrowthAnimation.toValue = (__bridge id)endingCirclePath.CGPath;
tapCircleGrowthAnimation.fillMode = kCAFillModeForwards;
tapCircleGrowthAnimation.removedOnCompletion = NO;
// Fade tap-circle out:
CABasicAnimation *fadeOut = [CABasicAnimation animationWithKeyPath:@"opacity"];
[fadeOut setValue:@"fadeCircleOut" forKey:@"id"];
fadeOut.delegate = self;
fadeOut.fromValue = [NSNumber numberWithFloat:startingOpacity];
fadeOut.toValue = [NSNumber numberWithFloat:0.f];
fadeOut.duration = self.touchUpAnimationDuration;
fadeOut.fillMode = kCAFillModeForwards;
fadeOut.removedOnCompletion = NO;
[tapCircle addAnimation:tapCircleGrowthAnimation forKey:@"animatePath"];
[tapCircle addAnimation:fadeOut forKey:@"opacityAnimation"];
}
Hi bfeher,
I wanna ask a feature about custom badge view.
Or you could give some tips on implements it?
If i try to present a new viewController from the tabBar the observer is removed when the viewWillDiappear method is called, the next time i try to present a viewController the app will crash because it will try to remove a observer that is no longer registered.
Would not it be better register an observer in the viewWillAppear method?
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
// Set up tab bar for KVO on its 'hidden' key:
[self.tabBar addObserver:self forKeyPath:BFPaperTabBarControllerKVOKeyPath_hidden options:0 context:BFPaperTabBarControllerContext];
}
Hi, how can i change the inactive icon text and image color/tint? I mean, i want the unselected items to be red, and the selected one to be white, but i wasnt able to change the inactive items color. Can you help me? Thanks in advance.
BFPaperTabBar allow change position on current tabbar, but BFPaperTabBarController not allow. Please you support this!
When using the default tabbar controller each tab can provide a way to pop to its inner root controller within each navigation stack, by tapping twice on each tab. Here i cannot get the same behaviour: the second tap on a tab just does nothing.
I'm experimenting with this controller and figured that it raises NSRange out of bound exception when calling alloc init. it seems that alloc init somehow calls initwithnib, which I don't have any. Is this control only supposed to be used with storyboard?
TabBar Delegate never gets call
Is possible to use tabbaritems without label?
After push into a view controller, I set tabbar.hidden = YES, but click bottom tabbar area, still can change tabbar.
Set a view controller to "hide bottom bar on push", push into this view controller, then PaperTabBarController not work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.