小编Mun*_*a89的帖子

NSNotificationCenter事件是同步还是异步接收的?

如果一个类注册NSNotificationCenter某种类型的事件而另一个类发布该类型的事件,那么接收器中的代码是否会在发布类继续之前(同步)或之后(异步)执行?

- (void)poster {
    [[NSNotificationCenter defaultCenter]
        postNotificationWithName:@"myevent"
        object:nil];
    NSLog(@"Hello from poster");
}

- (void)receiver {
    [[NSNotificationCenter defaultCenter]
        addObserver:self
        selector:@selector:(mySelector)
        name:@"myevent"
        object:nil];
}

- (void) mySelector:(NSNotification *) notification {
    NSLog(@"Hello from receiver");
}
Run Code Online (Sandbox Code Playgroud)

在上面的代码示例中,"Hello from receiver"会在"Hello from caller"之前或之后打印吗?

nsnotificationcenter ios

36
推荐指数
1
解决办法
7267
查看次数

如何使用'+'运算符在ORACLE中执行FULL OUTER JOIN?

不使用FULL OUTER JOIN或FULL JOIN这样的关键字,如何在'+'运算符的帮助下使用'where'子句执行完全外连接?!

sql oracle

15
推荐指数
1
解决办法
6万
查看次数

标签 统计

ios ×1

nsnotificationcenter ×1

oracle ×1

sql ×1