English 中文(简体)
当当地通知方法要求采用某种其他方法时,以及我们评估是否执行长期职能时,应当发生什么情况?
原标题:What should happen when Local notification method calls some other method and our app is executing long function?

如何处理这种情况,当我开始一个长期的工作进程时。 我有一些通知是在我之间发出的,我不得不执行一些任务,即<编码>did ReceiveNotification。

Note that what i want to do is that i have to stop my function process and have to execute my notification method.

目前,我的主要工作暂停。 之后,这两项任务都hang忙。 如何更好地处理这项任务。

问题回答

使用Rupp而不是睡觉

[[NSRunLoop currentRunLoop] runUntilDate:(NSDate *)];




相关问题
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, ...

热门标签