问题标签 [uitabview]

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 投票
2 回答
1037 浏览

ios - 使用 PushViewController 时选项卡不显示

我正在尝试使用以下代码来显示 tabbarcontroller

它确实加载了视图,我可以告诉它我希望它默认到哪个选项卡。问题是标签不显示。从我读过的内容来看,我认为这与将选项卡控制器放在导航控制器内有关,但我找不到任何解决方案。

0 投票
1 回答
171 浏览

android - 我如何将 android tabactivity 放在活动的底部?

默认情况下,tabactivity 位于活动的顶部 我如何将 android tabactivity 放在活动的底部?(如 ios tabview)

非常感谢

0 投票
1 回答
709 浏览

ios - 从最初的 View Controller 如何将 acriss 转移到 UITabBarController 并使用 prepareForSegue

这是设置:

1) 单视图控制器 - 初始 Cobntroller = 带有按钮。

2) 带有 1 个视图控制器的标签栏控制器控制器 - 标签

当我按下按钮时,它将转到选项卡视图。

现在我想使用 prepareForSegue 传递一个字符串来更新标签栏控制器内的 1 视图控制器的标签。

当我这样做时,我得到一个

“无法识别的选择器发送到实例”。

所以我驾驶到选项卡视图控制器。

但是我无法在选项卡中引用 ViewController。

我怎样才能解决这个问题 ?

0 投票
2 回答
84 浏览

ios - 内存警告无法正常工作

我正在练习 TabViewcontroller 的工作原理。现在我有 UIViewcontroller 的 2 个子类。一个是 HypnosisViewController ,另一个是 TimeViewController。我想检查的是当 IOS 模拟器收到内存警告时-(void)viewDidLoad是如何工作的。我做到了

  1. 构建并运行应用程序
  2. 控制台说“HypnosisViewcontroller 加载了它的视图”。
  3. 切换了另一个选项卡(TimeViewController)
  4. 在控制台中看到了消息。它说“TabViewcontroller 加载了它的视图”
  5. IOS模拟器里有没有模拟器内存​​警告命令
  6. 控制台显示“HypnoTime 收到内存警告”。
  7. 切换回 HypnosisViewcontroller 以查看控制台是否显示“HypnosisViewcontroller 已加载其视图”。再次。

所以这里的问题是 HypnosisViewcontroller 没有被销毁并重新创建。(因为当我切换回 HypnosisViewcontroller 时我看不到日志消息。)但是我倾向于不在屏幕上的视图应该在内存警告期间被破坏。

我错过了什么?提前致谢!

HypnosisViewController.m:

时间视图控制器.m:

在此处输入图像描述在此处输入图像描述

0 投票
0 回答
65 浏览

ios - 导航栏未显示在第二个和第三个视图控制器中

我正在尝试将导航栏添加到我的标签栏视图控制器中。但是,它显示在 firstViewController 中,但没有显示在其他两个视图中。为什么这不起作用?

0 投票
1 回答
110 浏览

ios - 无法从 IOS 的 NSNotificationCenter 调用 UITabview

我能够在我的项目中实现下面提到的库。使用的库:: https://github.com/rolandleth/LTHPasscodeViewController

输入密码并验证它是否正确后,我无法在输入密码后直接切换到选项卡栏活动,但如果我在两者之间使用 NSNotification,我可以转移控制权。

我的代码:

放置 NSLog 后,我也得到了日志输出,但选项卡视图没有出现。

有没有办法在输入密码后直接调用选项卡视图。

Tabview 使用 StoryBoard 完成。

0 投票
4 回答
11256 浏览

ios - 导航标题未显示在选项卡视图控制器的视图中,但“返回”导航有效

我对 iOS Objective-C 开发比较陌生,遇到了一个我找不到解决方案的问题。

我有一个Table View Controller, 上面有两个原型单元,可以很好地填充。这Table View Controller是三个之一Tab ViewsView发送给的Tab Views有一个Navigation Controller。这意味着里面的viewsTab Views也有一个Navigationbar。该栏工作正常,就“后退”按钮按预期工作而言,并且栏就位。但是,(至少在列表视图上)Navigation Bar没有完全识别 - 它的标题没有出现,表格单元格直接在状态栏下方开始,而不是在导航栏下方。

这是显示问题的几个屏幕截图: Xcode 中出现的内容(我期望发生的情况) Xcode 中出现的内容(我期望发生的情况) 我的测试设备上实际出现的内容(iPhone 4、iOS 7.0.4) 然后在设备上,这就是实际出现的内容 - 后退按钮到位并且工作正常,但没有标题字段,以及表格单元格开始太高了。

我尝试添加Navigation Bar's 和Navigation Items,虽然添加 aNavigation Item允许我在 Xcode 中放置标题,但它仍然没有出现在测试中的设备上。我还尝试Navigation Controller在此视图之前添加另一个,但这也没有解决问题,并且它导致了进一步向下的导航问题。

希望我已经足够清楚了,如果我需要发布更多信息,请说 - 我对 Xcode 比较陌生,所以不确定什么是适用的,什么不是。谢谢!

0 投票
3 回答
1408 浏览

objective-c - Switch from view controller to custom tab bar controller

I have an application that has an initial view controller that allows the user to log in. After the users logs in I'm trying to change the view to a custom tab bar controller that is of class type TabViewController. The problem is that when I switch to the tab bar controller, the screen is black and the bottom tab bar is gray and empty.

Here is some relevant code:

in ViewController.m (initial log in view)

in TabViewController.m (class assigned to the tab bar controller)

Note that when I do the default initialization like so:

I get the same result.

How can I make my tab view controller look like it does in my storyboard on initialization?

Storyboard:

enter image description here

What the tab view controller looks like in the simulator:

enter image description here

0 投票
1 回答
267 浏览

xcode - UITabViewController hide / make appear a view in code

I am using Xcode 5.1.1. I have a UITabViewController and used Storyboard to add 10 views to it. It works great and I get the "more" and table view all for free.

I only want to show some of the tabs at the beginning. Once the user logs in with their Google+ account (I actually got that working), then I want the rest of the tabs to appear, since they are content sensitive to the user logging in.

I have found: [[[[self.tabBarController tabBar]items]objectAtIndex:3]setEnabled:FALSE];

But I do not want the items just greyed out, I want them removed completely until they log in. Thanks

0 投票
1 回答
2156 浏览

objective-c - 隐藏标签栏项目但仍显示控制器

我会接受 swift 和 objective-c 的答案,因为翻译相当容易。

我想显示一个带有初始屏幕的选项卡栏,但我不希望该初始屏幕出现在选项卡栏项目中以供选择。

我现在的设置(下图)将登陆屏幕显示为标签栏显示时第一个显示的控制器。但是,我希望隐藏该标签栏项目。用户只能选择其他三个选项卡。我该怎么做呢?