English 中文(简体)
某人可以解释UINavig 主计长
原标题:Can someone explain UINavigationController setViewController and popToViewController
  • 时间:2011-11-17 17:18:02
  •  标签:
  • iphone

我很熟悉建立一个新的观点控制员的想法,把它推向前进。 迄今为止,我刚刚创立了我的观察控制员的榜样,并推动了这一榜样。 现在,我遇到一个问题,即我的3位不同观点的控制者是研究数据的相关途径。 我的根基勒有3个ic子可以开张,当你对一只con子施加压力时,你将第一名观众推向控制员。 我目前并不把观点控制者放在一个阵列,因为我不敢确定什么东西可以买我,或者这如何奏效。

Scenario 1: Click on icon 1 (push vc1), Point at a table in a popover in vc1, it llrove to vc3. 然后,你点击 v3号的物品,然后用 v1号。

情景 2 Click on icon 3 (push vc3), Point on some and go to vc1.

So the problem I m having is in scenario 1, it would seem to make the most sense to pop back to vc1 so they don t have a stack of vc1/vc3/vc1 and are looking at the data twice like that. But in scenario 2, since I started at vc3 instd of vc1, I should push vc1. But in both scenarios, the user is clicking on the same thing to go to vc1 from vc3, so how do I tell which viewController they came from in order to push or pop to vc1?

因此,我猜测,在我的想法中,我会把发音机或波夫·汤普洛普勒编成手法,但我不敢肯定这些工作如何,如果有一些简单的例子可以让我开始(假设这种做法是ok的)。 感谢!

最佳回答

从您的描述来看,我相信,你应该利用你推动和pop的导航控制器。 以前,航道必须明显。

这还像你一样,有时在推倒下两岸之前就pop。 你们需要检查电离层阵列的计数——如果目前的计数在推移之前会超过一席之地,否则就象你处于根基的控制器一样。

或者,你可以使用PpopToRootViewController Animated:NO 每一次开车。

问题回答

UINavigationController is what allows you to manage your views. setViewController allows you to set which controller handles your view. popToViewController takes the current view controller off the stack to the specified view.

海事组织...... 后两条提倡“血汗”逻辑,应当加以稀释。





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签