0
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?
}
這是什麼問題null
檢查viewController
,它似乎並沒有工作。對於ViewController的這個NULL檢查有什麼問題?
或者,您可以'if(controller == nil)`(兩者同樣正確)。 – 2011-02-10 05:08:12