最近写代码发现一个问题, 只是想细致推敲下.
一些三方的方法会这样写:
[self.navigationController presentViewController:vc animated:YES completion:NULL];
这句我一般会写成:
[self.navigationController presentViewController:vc animated:YES completion:nil];
问题来了, completion对应的是个block. block置空是用NULL好些呢还是nil?
Block is an object, generally used
nil
,当然你用NULL
no problem