objective c - How to define a method to show up when subclassing a custom class -
i'm not sure title makes sense, i'm having problems asking (and google searching) solution below question in single coherent sentence.
i've created custom class sole intention of subclassing it. have single method i'll need override when writing new subclass. i'm looking is, when create new file, , choose custom class subclass i'd new implementation file have empty version of method. similar how init method, or drawrect method (when appropriate) in implementation file when creating new class.
does make sense?
you can define template in editor that. there no mechanism in objective-c language can that.
however, create protocol required method , implement (instead of subclassing existing class), if fits need. gives compile error if forget implement method.
Comments
Post a Comment