问题标签 [uitabbaritem]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
1196 浏览

iphone - 使用 UITabbaritem 作为 UIButton

有没有办法将 UITabbaritem 用作 UIButton?我正在尝试制作一个标签栏,它的项目不会改变视图。只希望他们在同一个视图控制器中执行简单的操作。

谢谢。

0 投票
1 回答
3325 浏览

iphone - UITabbar without controller

I have a simple app where the only view controller has an outlet to a UITabBar. It also implements UITabBarDelegate and is set as the delegate for the UITabBar:

I implemented the following method Which gets called whenever any of my 4 UITabBarItems get tapped. I tried just doing something really simple:

In theory, it should always stay selected on my first tab and it works perfectly when I just tap any UITabBarItem (nothing happens, the first one always stays selected). But when I touch a UITabBarItem and hold it (not taking my finger off) the selection changes anyway ! Debugging, everything gets called properly.

It's like changing the selectedItem property doesn't have any effect is the user still has the item "down" (with his finger on it).

What would be a good workaround? I tried overloading UITabBar and messing with touchesBegan and touchesEnd but they don't even get called. Same with UITabBarItem.

Oh and please don't suggest using a UITabBarController as it is not flexible enough for my application.

So frustrating....thanks!

0 投票
3 回答
7272 浏览

iphone - iphone在按钮单击时更改标签栏项目

我的 iphone 应用程序中有 4 个选项卡。当用户单击选项卡 1 中的按钮时,我想将用户移动/切换到另一个选项卡,假设选项卡 2。

怎么做?

0 投票
11 回答
34902 浏览

iphone - 更改 tabbaritem 的字体大小

是否可以更改选项卡的字体大小?

0 投票
1 回答
1895 浏览

iphone - iPhone 以编程方式实例化 UITabBarItem

尽我所能,我无法让它发挥作用。这是我最近的尝试。有人能告诉我为什么这不起作用吗?

在我的视图控制器的 init 方法调用的方法中:

它所做的只是在图像应该放置的地方放置一个大正方形。标签栏中的标题与视图控制器的标题相同。

一切都在这里以编程方式实例化,包括标签栏控制器。

0 投票
1 回答
574 浏览

iphone - 有没有办法禁止 UITabBarItem 重新加载其第一个视图?

我目前有一个应用程序,它是一个标签栏样式应用程序并支持旋转。一切都很好,直到您在设备处于横向时点击标签栏并且重新加载原始视图并重新放置在屏幕上。空间很大,整体外观不好看。有没有办法禁止这个标签栏项目这样做?或者,如果我可以通过说如果在横向中推送这个来让它加载一个特定的视图,那也可以。

非常感谢任何帮助,谢谢

0 投票
1 回答
371 浏览

iphone - iPhone dev - TabBarItem 的数量

我想创建一个标签栏项目的数量由用户定义的标签栏(假设它存储在变量 NumberOfTabBarItem 中)。有没有办法将标签栏项目放入某种数组并显示?谢谢!

0 投票
1 回答
2149 浏览

uitabbarcontroller - 如何在 UITabBarController 中刷新 UIView?

我在 TabBar 中刷新视图。UIView 在我第一次按下 TabButton 时是只读的,下次不会“viewDidLoad”。每次按下按钮时,我都想刷新 UITableView。

谢谢!

0 投票
1 回答
1264 浏览

objective-c - UITabBarItem 中的白色图像

最后几天我尝试将 UITabBarItem 创建为 UIImage。但我只得到一个白色方块。我尝试使用 png 8、png 24、gif 和 jpg。图像会很喜欢,因为如果我将图像更改为更大的图像,白色方块也会更大。

这是我的代码:

谢谢,诺斯特拉

0 投票
3 回答
1416 浏览

iphone - TabBar /“更多视图控制器” - 可能有黑色以外颜色的图标?

是否可以让 TabBar 和/或“更多导航控制器”中的图标采用灰色和黑色以外的颜色?我尝试使用 UITabBarItem 更改为视图控制器设置的图标的颜色

方法。

我的客户认为界面太暗了,想用一些彩色图标来照亮它……

谢谢!