Closed Gx952743985 closed 7 years ago
两个按钮暂时还不支持,特殊按钮的尺寸你自己可以设置,慢慢调整下。请问你什么情景下需要使用两个不规则按钮呢?有没有设计图之类的,我之前没考虑过这种情况。
谢谢你的解答和开源库的分享,这个没有设计图,那只是领导的一个需求:一共五个,中间为不规则(这个你的开源库已经实现),中间和第四个实现按钮实现类似于新浪微博中间按钮那样弹出视图,目前我已经实现了中间那个按钮弹出视图,我只是觉得第四个要是有个按钮就也能很简单的实现了.或者说你有什么更好的建议
中间的,和第四个,实际并不跳转控制器,只是弹出动画?
是的,只是弹出动画,并不跳转控制器.
参考下这个思路 http://www.jianshu.com/p/7c440689574b , 先这样操作 [self cyl_tabBarController].delegate = self; 然后再代理方法里实现这两个弹出动画。
好的,非常感谢
我用了你上面👆说的那个方法,在你的框架中- (BOOL)tabBarController:(UITabBarController )tabBarController shouldSelectViewController:(UIViewController )viewController中每个viewController都是CYLBaseNavigationController,还得麻烦你帮我想想办法
- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController{
// viewController->_tabBarItem->_title:
NSLog(@"ddddd--%@",viewController.tabBarItem.title);
if ([viewController.tabBarItem.title isEqualToString:@"同城"]) {
NSLog(@"要跳到最后一个ViewController,但是我们返回NO,就不会跳转了");
return NO;
}
return YES;
}
用这个方法解决了,转给有需要的人
怎么把中间特殊的按钮弄得跟两边大小一样?怎么弄两个这样不规则的按钮呢