07-21-2023, 07:04 PM
The answer to the question is scattered around in the comments under the already given answers. So, I am just summarising and simplifying here.
#Option1: Protocols#
If you want to create an abstract class with no implementation use 'Protocols'. The classes inheriting a protocol are obliged to implement the methods in the protocol.
@protocol ProtocolName
// list of methods and properties
@end
#Option2: Template Method Pattern#
If you want to create an abstract class with partial implementation like "Template Method Pattern" then this is the solution.
#Option1: Protocols#
If you want to create an abstract class with no implementation use 'Protocols'. The classes inheriting a protocol are obliged to implement the methods in the protocol.
@protocol ProtocolName
// list of methods and properties
@end
#Option2: Template Method Pattern#
If you want to create an abstract class with partial implementation like "Template Method Pattern" then this is the solution.
[To see links please register here]