Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
どのタイプに属するIDタイプを取得するにはどうすればよいですか。タイプに応じて異なる方法を実行します
-(id)initWithImage:(id)texture { if(texure == NSString) { do fun1; } if(texture == NSMutableArray) { do fun2; } }
[texture isMemberOfClass: [NSString class]]
(または、サブクラスにも YES を返したい場合は isKindOfClass )
In developing a class that should handle various generic lambda expressions, I fell into a rather familiar hole: I had a MyClass<T> class, and I tried to cast MyC
MyClass<T>
MyC