悬浮中心标签栏控制器
继承 FinalRaisedCenterTabController,并在viewDidLoad 方法中添加以下代码
self.centerButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self.centerButton setImage:[UIImage imageNamed:@"YourImageName"] forState:UIControlStateNormal];
//add target for the center button
[self.centerButton addTarget:self action:@selector(YourSelector) forControlEvents:UIControlEventTouchUpInside];
您还需要禁用中间的标签栏项
抱歉通知您,此控制器并不完美。当设置 hideBottomBarWhenPushed 为 YES 时,centerButton
会在延迟后消失,我不知道如何修复此问题。
如果您有解决办法,请通过邮箱 [email protected] 或 发起一个 pull request 给我。感谢您的贡献。