English 中文(简体)
通行证
原标题:Pass object from VC to App Delegate

我在万国邮联中有几个物体,我想从我的申请代表那里获得。

我的武革委发表了另一封信,这令我 app。 这一反馈触发了我的申请代表采用的方法:

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url

但是,我想利用我在前一个武革委中确定的方法中的一些物体。 任何想法如何?

最佳回答

用途

+(id)sharedApplicationDelegate; in delegate.h, and write

+(id)sharedApplicationDelegate{
    return  [[UIApplication sharedApplication] delegate];
}

In delegate.m. Make object data type variable in .h and set its property. Write a method like this:

-(void)setObjectForDelegate:(ObjectType *)value{
//use value obj or set it to other variable
}

How to Use:

#import “XXXXdelegate.h”
[[UIApplication sharedApplication] setObjectForDelegate:object];
问题回答

暂无回答




相关问题
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风格的解决办法,只是一个简单的袖珍流程......

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

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

热门标签