NSObject
클래스를 가져 오지 않은데도 함수를 사용하고 객체를 만들 수있는 이유는 무엇입니까?Foundation을 가져 오지 않고도 여전히 작동하는 이유는 무엇입니까?
int main (int argc, char *argv[])
{
@autoreleasepool {
NSLog(@"hi");
NSArray *array = [NSArray arrayWithObject: @"hello"];
NSLog(@"%@", array);
}
return 0;
}
출력 재단은 암시 적으로 각 헤더에 추가됩니다 그래서 당신이 재단을 가져 오는 미리 컴파일/접두사 헤더가
2012-08-11 22:15:33.854 prog[1282:403] hi
2012-08-11 22:15:33.857 prog[1282:403] (
hello
)