Comments (9)
Thanks for looking into this issue. Other than adding the code you have provided, what must I do to enable this feature? Thanks.
from foldingtabbar.ios.
I currently do not know another way than adding the hitTest-Method. Do you have any problems with it?
from foldingtabbar.ios.
Sorry, I was a bit unclear. I have already added the hitTest method, but what else must I do to make it work? It doesn't seem to change anything.
from foldingtabbar.ios.
I use it without any other source code and i am able to touch the space between the centerButton and extraLeftButton/extraRightButton. Make sure the bar is collapsed.
Do you use a special setut and can provide some source code? I utilize the TabBarController with the snippet below.
AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// access tabBarController -> Storyboard
YALFoldingTabBarController *tabBarController = (YALFoldingTabBarController *) self.window.rootViewController;
// prepare leftBarItems
YALTabBarItem *one = ...;
YALTabBarItem *two = [[YALTabBarItem alloc] initWithItemImage:[UIImage imageNamed:@"..."]
leftItemImage:[UIImage imageNamed:@"..."]
rightItemImage:[UIImage imageNamed:@"..."] ];
tabBarController.leftBarItems = @[one, two];
// prepare rightBarItems
YALTabBarItem *three = ...;
YALTabBarItem *four = [[YALTabBarItem alloc] initWithItemImage:[UIImage imageNamed:@"..."]
leftItemImage:[UIImage imageNamed:@"..."]
rightItemImage:[UIImage imageNamed:@"..."] ];
tabBarController.rightBarItems = @[three, four];
tabBarController.centerButtonImage = [UIImage imageNamed:@"..."];
tabBarController.selectedIndex = 1;
// customize tabBarView
tabBarController.tabBarView.extraTabBarItemHeight = YALExtraTabBarItemsDefaultHeight;
tabBarController.tabBarView.backgroundColor = [UIColor clearColor];
tabBarController.tabBarView.tabBarColor = [UIColor redColor];
tabBarController.tabBarView.tintColor = [UIColor whiteColor];
tabBarController.tabBarView.dotColor = [UIColor whiteColor];
tabBarController.tabBarViewHeight = YALTabBarViewDefaultHeight;
tabBarController.tabBarView.tabBarItemsEdgeInsets = YALTabBarViewItemsDefaultEdgeInsets;
}
from foldingtabbar.ios.
Here is my code. I don't see anything differences, but I may not be catching them. Thanks for all the help.
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let tabBarController = self.window?.rootViewController as! YALFoldingTabBarController
let item1 = YALTabBarItem(itemImage: UIImage(named: "..."), leftItemImage: nil, rightItemImage: nil)
let item2 = YALTabBarItem(itemImage: UIImage(named: "..."), leftItemImage: nil, rightItemImage: nil)
let item3 = YALTabBarItem(itemImage: UIImage(named: "..."), leftItemImage: nil, rightItemImage: nil)
let item4 = YALTabBarItem(itemImage: UIImage(named: "..."), leftItemImage: nil, rightItemImage: nil)
tabBarController.tabBarView.offsetForExtraTabBarItems = YALForExtraTabBarItemsDefaultOffset
tabBarController.leftBarItems = [item1, item2]
tabBarController.rightBarItems = [item3, item4]
tabBarController.centerButtonImage = UIImage(named: "PlusIcon")
tabBarController.tabBarViewHeight = 80.0
tabBarController.tabBarView.backgroundColor = UIColor.clearColor()
tabBarController.tabBarView.extraTabBarItemHeight = 60.0
tabBarController.tabBarView.tabBarViewEdgeInsets = YALTabBarViewHDefaultEdgeInsets;
tabBarController.tabBarView.tabBarItemsEdgeInsets = YALTabBarViewItemsDefaultEdgeInsets;
// Override point for customization after application launch.
return true
}
from foldingtabbar.ios.
Yeah, looks ok. I changed the example to demonstrate the functionality. Check my example branch and take a look at the provided image.
from foldingtabbar.ios.
I looked at the branch. It seems that some code that I added was disrupting with your new functionality. I removed it and it worked as you said it would. Do you have any idea how I could rewrite this snippet so that it will work with your new functionality? Thanks.
- (void)setupMainView {
self.mainView = [[UIView alloc] initWithFrame:UIEdgeInsetsInsetRect(self.bounds, self.tabBarViewEdgeInsets)];
self.expandedFrame = self.mainView.frame;
self.mainView.layer.cornerRadius = CGRectGetHeight(self.mainView.bounds) / 2.f;
self.mainView.layer.masksToBounds = YES;
// self.mainView.backgroundColor = self.tabBarColor;
//My edits to the FoldingBar view
UIVisualEffect *blurEffect;
blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
UIVisualEffectView *visualEffectView;
visualEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
visualEffectView.frame = self.mainView.bounds;
[self.mainView addSubview:visualEffectView];
CALayer *extraColorLayer = [CALayer layer];
extraColorLayer.frame = CGRectMake(0, 0, self.mainView.frame.size.width, self.mainView.frame.size.height);
extraColorLayer.backgroundColor = [UIColor colorWithRed: 0.36078 green: 0.517647 blue: 0.698039 alpha: 0.3].CGColor;
[self.mainView.layer addSublayer:extraColorLayer];
self.mainView.backgroundColor = [UIColor clearColor];
[self addSubview:self.mainView];
}
from foldingtabbar.ios.
Your visualEffectView is consuming all touches! You should disable its userInteraction to "redirect" touches to its superview (in this case self.mainView).
visualEffectView.userInteractionEnabled = NO;
from foldingtabbar.ios.
Thanks so much! Its working now.
from foldingtabbar.ios.
Related Issues (20)
- unable to add the badge to tabbar item.
- Multiple commands produce
- Memory Issue HOT 1
- The FoldingTabBar is not displayed when using performSegue, The bar is shown but in black HOT 6
- TabBar without controller HOT 2
- Performing a segue from a ViewController HOT 2
- rightItemImage
- Is there any way to show badges on the tabBar items ?
- How to collapse tabbar programatically on swift?
- Making background transparent
- Setting title in view controller make title on tabbar appear
- How to hide the tabbar
- Chat cells animation
- Issue with iPhone X HOT 2
- How to prevent collapse on selecting an item
- Get center and each item views for attaching showcase
- 如果要用纯代码,怎么样集成 HOT 1
- Does not Provide Permission to Change the Colour of View . HOT 1
- So , it is just "wast of time" Library used in iOS HOT 1
- How to add the transparent color to tabBarView HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foldingtabbar.ios.