0

I want the NSMutableArray only store "MyObject" only... ...instead of any objects. How can I do this? thz.

Tattat
  • 15,548
  • 33
  • 87
  • 138

1 Answers1

4

There is no concept like C# Generics or C++ Templates in Objective-C, as discussed here before, but you could create a class which exposes an array and has add and remove-methods which take only your object type (see here).

Community
  • 1
  • 1
gammelgul
  • 3,450
  • 1
  • 20
  • 16