iOS Question How to do call object c function in b4i?

bagazhou

Member
Licensed User
Longtime User
Hi

i want to do call object c "GetInfo" function , but how can i do in b4i ?





NSNotificationCenter * center = [NSNotificationCenter defaultCenter];


[center addObserver : self selector : @ selector(GetInfo:) name : @ "logInfo" object:nil];
[center addObserver : oneobj selector : @ selector(oneObjHandleInfo:) name : @ "logInfo" object:nil];
[center postNotificationName : @"logInfo" object : @"00000"];


-(void) GetInfo : (NSNotification * ) notificaion{

NSString * data = [notificaion object];
NSLog(@">> %@",data);
}


-(void) oneObjHandleInfo : (NSNotification * ) notification{

NSString *data = [notification object];
NSLog(@">>OneOBJ %@",data);
 
Last edited:
Top