我在哪裏可以找到內置類(如UIGestureRecognizer或UIMenuItem等)中的回調方法的方法簽名?Objective-C中選擇器的查找方法簽名C
例如,用於文檔狀態UIMenuItem:
initWithTitle:動作:
創建並返回與給定標題和動作初始化的菜單項對象。- (ID)initWithTitle:(NSString的)標題行動:(SEL)動作
參數
標題
菜單項的標題。
動作
一個選擇器,標識響應器對象調用的方法,以處理由菜單項表示的命令。
返回值
已初始化的UIMenuItem對象,或者如果在創建對象時出現問題,則返回nil。
我怎麼知道'action'可能接收到什麼參數?
UIKit [有點不同](http://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/CommunicateWithObjects.html#//apple_ref/doc/uid/TP40002974-CH7-SW44)在慣例。 – 2010-09-14 23:23:16
這是爲可可;在Cocoa Touch中,動作方法可以採取以下三種形式中的任意一種,所有這些都記錄在這裏:http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/CommunicateWithObjects.html% 23 // apple_ref/DOC/UID/TP40002974-CH7-SW44 – 2010-09-14 23:24:02