Search code examples
iosobjective-cfactory-pattern

Factory class - stop init


I want to create a factory class to create objects for me (of a specific class).

The Factory class will just have class methods. Is there a way I can stop alloc init from being called on the class?


Solution

  • Yes you can, define init at you interface as

    - (id) init __unavailable;