开发者社区 问答 正文

UITabBar 添加发布按钮

screenshot
如何实现像Instagram这样的中间的tab是一个发照片的按钮的,是直接加按钮进行覆盖么

展开
收起
a123456678 2016-07-28 14:50:31 2159 分享 版权
1 条回答
写回答
取消 提交回答
  • func tabBarController(tabBarController: UITabBarController, shouldSelectViewController viewController: UIViewController) -> Bool {
    
        if find(tabBarController.viewControllers as! Array, viewController) == 2 {
            performSegue.....
            return false
        }
        return true
    }

    func tabBarController(tabBarController: UITabBarController, shouldSelectViewController viewController: UIViewController) -> Bool {
    
        if find(tabBarController.viewControllers as! Array, viewController) == 2 {
            performSegue.....
            return false
        }
        return true
    }
    2019-07-17 20:01:24
    赞同 展开评论
问答地址: