问题标签 [navigationcontroller]

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 回答
1337 浏览

javascript - How do I render a bar similar to images.google.com?

How does images.google.com render its frames??

I have two servers, that have external web viewable content, and an internal search engine that only admins can use. The external content cannot be edited, it was created with some proprietary technology. What I want to do is allow my internal admins to see a bar that allows them to perform administrative functions on the external site (index) by appending an "admin bar" to the bottom of the page, much like images.google.com appends a frame to the beginning of websites.

Using this code below I have figured out how to do this if the two were on the same server, rendering the external site in a frame and dynamically sizing that frame with javascript, but I cannot figure out how to do this in my situation because the two sites are on different servers/domains (which cause a javascript permission error).

Quite a few people have implemented similar features (images.google, the diggbar, facebook's bar, etc.), so i know it's possible, I just can't get any info on how to approach the problem. Any help is greatly appreciated

0 投票
1 回答
500 浏览

iphone - 用于视图控制器的观察者 iphone

有什么方法可以检查当前导航控制器或当前在应用程序委托方法中可见的视图控制器。

我想在应用程序委托中创建一个观察者,观察控制器被推送并从堆栈中弹出,以便我可以显示所需的选项卡栏控制器。基本上我的应用程序有多个标签栏控制器。

0 投票
2 回答
964 浏览

iphone - UISearchDisplayController,UINavigationController,UITabBarController 问题

大家好,遇到一个小问题

我已经通过 IB 创建了所有视图,主窗口有一个 NavigationController,一个 TabBarController 在其第一个选项卡中加载了一个 TableViewController。

当我在导航控制器中使用搜索栏控制器时会出现问题,除了顶部的导航栏消失时,表格扩展得太高,我无法弄清楚我做错了什么。

附件是我所指的图像,任何帮助将不胜感激。

替代文字 http://img263.imageshack.us/img263/4706/picture1ot.png

更多信息:

我有一个带有 UINavigationController 和一个 UITabBarController 的 MainWindow。在第一个选项卡上,我让它加载另一个笔尖“AVN_TableController”,它是一个 UITableViewController 笔尖,带有 Searchbar 委托。

0 投票
5 回答
2759 浏览

iphone - 从应用程序委托向 viewController 发送消息

我是 obj C 的新手,我来自 AS3.0 背景。基本上在我正在制作的这个应用程序中,我在应用程序委托中使用 applicationWillResignActive 来响应传入的呼叫。我有一个带有表格视图的navigationController,它只触发select 上的另一个视图(基本上是xcode 中提供的模板) 我的AnotherViewController 视图中有一个从行选择加载的方法。该方法将(现在)将我的标签更改为“来电”。在我的 applicationWillResignActive 中,我调用了这个方法,它工作正常,但我收到一个烦人的警告,说 UIViewController 可能无法响应 handleIncomingCall ...但它编译得很好并且确实响应它。我怎样才能摆脱这个警告标志?

对不起,我想弄清楚如何在这里格式化它......

0 投票
3 回答
849 浏览

html - 导航栏无故移动

我正在玩一个网站,主要是为了我的学习目的,在我的一个页面上,导航栏比所有其他页面都向左移动了大约 5 个像素。我看不出它为什么不应该与其他人完全相同。有谁知道为什么?

0 投票
3 回答
953 浏览

iphone - iphone:使用navigationcontroller pop 发回字符串值

这可能是非常基本的,但我只是不知道该怎么做,所以感谢您的任何回复......

我正在使用导航控制器,目前位于堆栈的第二层。在这里,我设置了一个字符串值并使用 popViewControllerAnimated 返回到堆栈中的第一级。

使用堆栈中第二级的字符串值的最佳解决方案可能是什么?我试图在第二级手动设置第一级的值,但我一定做错了什么......

谢谢!

编辑:我m very new to both objective-c and C in general so i还是有点困惑:(

0 投票
2 回答
3166 浏览

iphone - 将 UIImagePickerController 推到左侧

我正在制作一个相机应用程序,它允许用户访问照片库。他们触摸按钮,然后使用 presentModalViewController 弹出 UIImagePickerControllerSourceTypeSavedPhotosAlbum。当他们触摸一张照片时,我想要一个视图将 ImagePicker 推到左侧并进入新视图。问题是,我想让 ImagePicker 保持向上,所以当他们回到它时不会有延迟. 这发生在 NightCamera 等许多相机应用程序中。每当我使用[self.navigationController pushViewController:photoPreview];时,它都会将视图推送到主视图,而不是选择器。当我使用[picker.navigationController pushViewController:photoPreview];时,什么都没有发生,因为选择器的 navigationController 是 nil。有谁知道该怎么做?

0 投票
5 回答
8872 浏览

iphone - 添加子视图后 self.navigationController 为零

这是我的 productscontroller.h

我在我的实现中添加列表和网格视图作为这样的子视图

但是当我尝试像这样从 ProductListViewController.m 推送 detailview 控制器时

它只是不起作用,然后我检查 [self.navigationController] ,它是 nil,现在如何处理这个问题。我准备提供更多代码和细节以更清楚。谢谢

0 投票
3 回答
720 浏览

iphone - iphone navigationController 不会显示,除非我访问 .view

当我为我的导航控制器创建一个 iboutlet 并尝试将其添加到当前视图时,它没有显示任何内容。真的很奇怪,当我在代码中初始化我的 navigationController 然后将其添加到视图中时,它可以完美运行。

当我在 mainWindows.xib 中创建一个并将其添加到我的 applicationDidFinishLaunching 方法中的视图时,它甚至可以工作。

但是,一旦我尝试从另一个 viewController 加载它,它就会失败,我只剩下一个空白屏幕。

因此,当我以编程方式添加它或将它添加到我的 mainWindow.xib 时它可以工作。

我已经尝试了几个小时让它工作。看起来很简单,但我无法让它在其他 xib 文件中工作。

我的设置:

我的 RootViewController 有到 navigationController 的 ibOutlet。

有人有想法吗?我完全不明白为什么这个简单的事情不起作用。我错过了什么,它让我发疯。

****更新**** 如果我将上面的代码更改为:我需要访问 rootViewController.view 否则它将无法工作,为什么?

提前致谢!

0 投票
3 回答
2100 浏览

iphone - Iphone UINavigationController onchange 事件

我有一个使用导航栏的应用程序。我想要完成的是当我从导航序列中推入最后一个视图时使其透明,并在我单击导航上的后退按钮时使其不透明

我在dealoc上尝试过,但它不起作用。我的视图是 UIScrollView 而不是 UiView,但我想这没什么区别。

如我所见,我必须控制导航栏上的事件,并通过循环查看视图的类型或在当前视图的“卸载”上触发某些事件

当我推入视图时,我会执行 self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;

当它弹出时我需要

self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;