如何创建自定义中心选项卡按钮? [英] How To Create A Custom Center Tab Button?

查看:100
本文介绍了如何创建自定义中心选项卡按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在这里按照这里教程重新创建一个自定义中心标签按钮,但我已经在IB中我的标签栏控制器设置。任何人都可以帮助我这样做?本教程通过代码完成这一切,因此难以遵循。

I'm trying to follow this tutorial here to recreate a custom center tab button, but I already have my tabbarcontroller setup in IB. Can anyone help me do this? The tutorial does it all through code so its difficult to follow.

http://idevrecipes.com/2010/12/16/raised-center-tab-bar-button/

>

推荐答案

他们所做的只是创建一个空白的UITabBarItem,没有图像或名称,只是一个占位符。然后他们在UITabBar的顶部放置一个带有自定义图像(即绿色相机按钮)的UIButton。只要进入界面生成器,并添加一个新的TabBarItem,并在其上放置一个UIButton。

All they're doing is creating a blank UITabBarItem, no image or name, simply a placeholder. They then put a UIButton with a custom image (i.e. the green camera button) on top of the UITabBar. Just go into interface builder and add a new TabBarItem and put a UIButton on top of it.

这篇关于如何创建自定义中心选项卡按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆