简体   繁体   English

如何在iOS上制作显示彩色图标的标签栏?

[英]How to make a tab bar that shows colored icons , on iOS?

I need to make a toolbar on the bottom of the screen with some buttons. 我需要在屏幕底部创建一个带有一些按钮的工具栏。 I want in every button to have a small image and a small text under it. 我希望每个按钮下都有一个小图像和一个小文本。 The closest i can find from "Xcode" is the "Tab Bar" where you can put icons and text but the problem is that when you add an image you can only see the shadow of the image and not its colors.. Can i change that? 我可以从“ Xcode”找到的最接近的是“标签栏”,您可以在其中放置图标和文本,但是问题是,当添加图像时,只能看到图像的阴影,而不能看到其颜色。那? Or is another way to make a toolbar like the one i am describing? 还是制作工具栏的另一种方式,就像我正在描述的工具栏一样?

EDIT 编辑

I need the buttons to change controllers and i just noticed that i cant create actions for the tabs but only outlets. 我需要按钮来更改控制器,我只是注意到我不能为选项卡创建动作,而只能为插座创建动作。 So i guess the tab bar is not what i should use. 所以我想标签栏不是我应该使用的。 Any ideas for a toolbar? 对工具栏有什么想法吗?

Yes Tab Bar is the Best approach for it and it is very easy to customize the tab bar if u are using IO5 是的选项卡栏是最好的方法,如果您使用的是IO5,则自定义选项卡栏非常容易

This LINK will be helpful. 链接将很有帮助。

There is another approach (which was applicable uptil IOS4 for customization of Tab bar) was to Create Custom buttons with tab bar look alike Images. 还有另一种方法(适用于IOS4,可用于自定义选项卡栏)是创建选项卡栏外观类似于图像的自定义按钮。 it will give u the same feel, but like i said it is very easy now to customize IOS Tab bars 它会给您同样的感觉,但是就像我说的那样,现在非常容易地定制IOS Tab栏

Here is a couple of Links for u 这是您的几个链接

LINK 1 With Story BOARD 链接1与故事板

LINK 2 Without Storyboard 链接2无情节提要

One More thing Try searching Google before Posting a question here if have some problem then feel free to post along with the code or tutorial u tried. 还有一件事如果在遇到问题之前先尝试搜索Google,然后再将其与您尝试的代码或教程一起发布。

Let me know if i Worked 让我知道我是否工作

Cheers 干杯

W w ^

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM