myCustomController *controller = [myMutableArray objectAtIndex:page];
NSLog(@"%@",controller); // <- THIS RETURNS NULL IN CONSOLE
if 开发者_高级运维((NSNull *)controller == [NSNull null]) {
// Why is the above check not working if controller in console says it's null?
// It's not jumping into this loop. Has something changed in iOS4.0 SDK?
}
what is wrong with this null
check for a viewController
, it does not seem to be working.
NSLog
should return (null)
(which probably is description for nil
), not NULL
in console. Your check should look like this:
if (!controller) {
// do some stuff here
}
精彩评论