objective c - What is the best way to rename a class in an iOS library? -
if wanted rename class used within ios library , api publicly exposed, best way that?
ideally, i'd have old name still around, marked deprecation warning people can switch using new syntax gracefully. because can't keep both classes around want developer still able use deprecated api internally calls renamed version of itself.
i playing around #define
, __attribute__((deprecated))
, @compatibility_alias
didn't find way accomplish of trying do.
first, use refactor rename class new name. then, want support old name depreciate, can use typedef statement:
__attribute__((deprecated)) typedef newclassname oldclassname;
Comments
Post a Comment