English 中文(简体)
UINavig 主计长 ViewDidDisappear不为观看而开枪
原标题:UINavigationController ViewDidDisappear not firing for view

I m 采用Mono Touch。 当我把一名新的控制员推向美国航空情报局局长的 st锁时,该控制员会进行罚款。 当我击退纽顿时,尽管有目光的眼光,但诺人大火。 具体地说,我想用观点DidDisappear和观点DidAppear来做一些事情:

SurveyEditor editor = new SurveyEditor(surveyInstance);
NavigationController.PushViewController(editor, true);

之后,调查局:

public override void ViewWillDisappear (bool animated)
{
  Console.WriteLine("SurveyEditor ViewWillDisappear");
  base.ViewWillDisappear (animated);
}

public override void ViewDidDisappear (bool animated)
{
  Console.WriteLine("SurveyEditor ViewDidDisappear");
  base.ViewDidDisappear (animated);
}

所有这些都没有被叫来,从我的观点来看,“观点”也没有被称作! 开始失去我对此的念头。

最佳回答

如果你使用以下方法从主计长那里发射纳夫控制器,那就叫了:

[self presentModalViewController:navigationController animated:YES];

(令人担心的是,这不是莫托奇——我在经常目标C中遇到了这个问题。) 这是我的解决办法。

看看杜斯廷·克拉克在这里的评论

问题回答

由此可见,如果我有一位导航控制员,这些事件就不会发生。

要求它不要听说过。 没有任何魔.,它只是一种方法。 让我们知道它会消失。





相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签