Nil is for object pointers
NULL is for non pointers
[NSNULL null] is an object to represent "nil" to be used in cases that nil values are not allowed (as pointed out by Vince, like in collections e.g. NSArray and NSDictionary)
注:所以碰到需要函数指针时要用 NULL
如,
- (void)presentViewController:(UIViewController *)viewControllerToPresent animated: (BOOL)flag completion:(void (^)(void))completion NS_AVAILABLE_IOS(5_0);
->
[self presentViewController:a animated:YES completion:NULL];