-1

I just noticed I get a lot of redondant code from one class to another in my project (like menus or buttons) ;)

Is there any way to optimize it ?

Thank you !

Gotye.

gotye
  • 958
  • 2
  • 14
  • 33

2 Answers2

0

I am sure there is #include directive in Objective-C

Axarydax
  • 16,353
  • 21
  • 92
  • 151
0

Use classes for common code. Or refactor and base several classes on an abstract superclass. Or use regular C functions. Or use categories to add methods to library functions.

shosti
  • 7,332
  • 4
  • 37
  • 42