인스트루먼트를 가지고 노는 것만으로 더 깊은 수준의 코어 파운데이션과 코코아 터치 시스템을 이해하려고합니다.코어 파운데이션과 코코아 터치 언더 코어 네이밍 규칙 (1 또는 2 밑줄)
Core Foundation (CF) 및 Cocoa Touch (UI)의 밑줄 명명 규칙은 무엇입니까?
예를 들어, 다음은 내 앱 중 하나에서 얻은 런타임 오류입니다. 일부 CF 메서드는 접두사가 2가 붙는 이유는 (__CFRunLoopDoSources0,__CFRunLoopRun)
(CFRunLoopRunSpecific, CFRunLoopRunInMode)
입니까? UI 메소드와 동일합니다. 다른 접미사가 (UIApplicationMain)
이 아닌 반면, 접두사가 1 인 접두사는 왜 ( _UIApplicationHandleEventFromQueueEvent,_UIApplicationHandleEventQueue)
입니까?
2014-10-30 11:02:54.929 Scratchpad3[1822:204482] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Storyboard (<UIStoryboard: 0x790806f0>) doesn't contain a view controller with identifier 'PageViewController''
*** First throw call stack:
(
0 CoreFoundation 0x0362d946 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x032b6a97 objc_exception_throw + 44
2 UIKit 0x022a70fc -[UIStoryboard instantiateInitialViewController] + 0
3 Scratchpad3 0x00070fcf -[Analytics2ViewController viewDidLoad] + 383
4 UIKit 0x01de52a4 -[UIViewController loadViewIfRequired] + 771
5 UIKit 0x01de5595 -[UIViewController view] + 35
6 Scratchpad3 0x00060d75 -[IIViewDeckController setCenterController:] + 3429
7 Scratchpad3 0x0007087a -[SettingsViewController analytics2Clicked:] + 170
8 libobjc.A.dylib 0x032cc7cd -[NSObject performSelector:withObject:withObject:] + 84
9 UIKit 0x01c8f23d -[UIApplication sendAction:to:from:forEvent:] + 99
10 UIKit 0x01c8f1cf -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
11 UIKit 0x01dc2e86 -[UIControl sendAction:to:forEvent:] + 69
12 UIKit 0x01dc32a3 -[UIControl _sendActionsForEvents:withEvent:] + 598
13 UIKit 0x01dc250d -[UIControl touchesEnded:withEvent:] + 660
14 UIKit 0x01cdf60a -[UIWindow _sendTouchesForEvent:] + 874
15 UIKit 0x01ce00e5 -[UIWindow sendEvent:] + 791
16 UIKit 0x01ca5549 -[UIApplication sendEvent:] + 242
17 UIKit 0x01cb537e _UIApplicationHandleEventFromQueueEvent + 20690
18 UIKit 0x01c89b19 _UIApplicationHandleEventQueue + 2206
19 CoreFoundation 0x035511df __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
20 CoreFoundation 0x03546ced __CFRunLoopDoSources0 + 253
21 CoreFoundation 0x03546248 __CFRunLoopRun + 952
22 CoreFoundation 0x03545bcb CFRunLoopRunSpecific + 443
23 CoreFoundation 0x035459fb CFRunLoopRunInMode + 123
24 GraphicsServices 0x054cb24f GSEventRunModal + 192
25 GraphicsServices 0x054cb08c GSEventRun + 104
26 UIKit 0x01c8d8b6 UIApplicationMain + 1526
27 Scratchpad3 0x00071d5d main + 141
28 libdyld.dylib 0x040f3ac9 start + 1
29 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
일반적으로 내부 동작을 나타내는 데 밑줄이 사용됩니다. 기본적으로 "Yo, 이것을 참조하려고하지 마십시오. 이상하고 색다르다. 그래서 당신을 놀라게해야합니다."라고 말하는 그들의 방식입니다. –