user1147981 user1147981 - 1 year ago 242
iOS Question

Template in Objective C?

Everything is in the title :)

Is there any templates in ObjC ?

I need equivalent of c# :

public class MyClass<T> : Message

in ObjC .

Any helps will be strongly thanks :(

Answer Source

There is no such ObjC feature. While ObjC++ does exist, I strongly discourage its broad use. It has many problems from poor tool and debugger support, to poor compiler optimization, to degraded ARC performance.

Generally templates are not required in ObjC because it is not a strongly typed language. An NSArray can hold any object, so you don't need to use a template to get the right type. Do you have a specific problem you're trying to solve? There is likely a better ObjC solution.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download