9.5 融云聊天 添加Tab bar viewControl 标
2016-09-08 本文已影响58人
jayck

拖进去Storyboard后默认只有2个分支,我们再加两个viewControl,
直接拖动关联起来

选择viewControlers
这是注意,不是show, 也不是present

点击item,设置里面的Title,和Image(图标直接拖进来,一般尺寸是30x30左右)

这里要注意下,默认的图标是蓝色的,所以我们要修改下设置

右边栏最下面的Render As 修改设置为原图

编译运行,结果如下:

运行后看到,跳转到聊天界面以后标签栏挡住了我们的输入框。接下来我们要设置标签栏隐藏,在这个tabbar的类里,找到这个位置,prepareForSegue这段注释
取消注释,并添加代码 :
self.tabBarController?.tabBar.hidden = true


编译运行,如果没有隐藏,试下另一种方法。
更改这个对话框的属性,勾选Hide Bottom Bar on Push即可
