2016-10-06 53 views

回答

2

NSMapTable.strongToStrongObjects()將失敗與錯誤:

error: generic parameter 'KeyType' could not be inferred 
NSMapTable.strongToStrongObjects() 
     ^

NSMapTable的類聲明:

open class NSMapTable<KeyType : AnyObject, ObjectType : AnyObject> : NSObject, NSCopying, NSCoding, NSFastEnumeration 

你需要指定你的鍵和對象類型r地圖表在其聲明中:

NSMapTable<NSObject, NSObject>.strongToStrongObjects() 
+0

This work ... thx –