NSArray *test1 = [NSArray arrayWithObjects:@"1",@"2", nil];
NSArray *test2 = [NSArray arrayWithObjects:@"1",@"2", nil];
NSArray *test3 = [NSArray arrayWithObjects:@"1",@"2", nil];
NSLog(@"%d", [test1 count] == [test2 count] == [test3 count]);
將打印0.爲什麼?obj -c NSArray計數比較失敗
+1我盯着看那5分鐘的代碼認爲有些東西感覺不對,但我無法把它放在手指上。爲了我的項目,我想我最好今天做一些文書工作。 – 2009-11-10 14:55:38