JS端处理:
$("#back").click(function(){
var notifyCenter = plus.ios.importClass(“NSNotificationCenter”);
notifyCenter.defaultCenter().postNotificationNameobject(“SendNotifyFromHbuilder”,”information”);
});
OC端处理:
[NSNotificationCenter defaultCenter] addObserver: self selector:@selector(notifyAction:) name:@“SendNotifyFromHbuilder” object:nil];
- (void)notifyAction:(NSNotification *)notify{
扫描二维码关注公众号,回复:
31126 查看本文章
//处理事件
}