PCDVD數位科技討論區

PCDVD數位科技討論區 (https://www.pcdvd.com.tw/index.php)
-   疑難雜症區 (https://www.pcdvd.com.tw/forumdisplay.php?f=34)
-   -   我的問題找到解法, 但是卻看不懂 . XDD (https://www.pcdvd.com.tw/showthread.php?t=1149299)

冰的啦魔王大人 2018-07-13 03:43 PM

我的問題找到解法, 但是卻看不懂 . XDD
 
https://stackoverflow.com/questions...of-type-idnscop



:cry:


他最後一句是在講蝦餃?

ccx1103 2018-07-13 08:01 PM

(猜測)應該是說,編譯器?不認識這個有參數方法,
所以把參數拿掉即可??

ethanliu 2018-07-14 02:23 AM

拿掉 id 的類型宣告 (protocol?)
應該是這樣?

-(id)objectForKey: (id)options

cxh 2018-07-14 11:27 AM

大大是那一句??

沒看到全文,僅個人猜測,供參考 (對 Objective-c 不熟!!)

"Expected method to read dictionary element not found on object of type 'id<NSCopying>'"

“在'id <NSCopying>'類型的對像上找不到字典元素的預期方法

在swift 中,型別參照,(class ,struct ) 都是一種Type , 就是 說,'id<NSCopying>' ,有方法 method 未實作,以致於沒有發現,而這方法,可能是以多型方式實作。

那串文有人回說

Fixed the problem by deleting the <NSCopying> bit from the method.


所有的時間均為GMT +8。 現在的時間是06:59 PM.

vBulletin Version 3.0.1
powered_by_vbulletin 2024。