Split Objective-C Code into multiple files

后端 未结 7 1674
猫巷女王i
猫巷女王i 2020-12-05 12:19

I often feel the need to split the Objective-C code into multiple files for better readability. I want to avoid making classes and call them. I want simple import (like in p

相关标签:
7条回答
  • 2020-12-05 12:44

    I know this is an old thread and the Objective C gods won't like this solution, but if you need to split files, create a new .m file and paste your code there. Then, #include "yournewfile.m" after @implementation in the .m file where you want to include it. The trick to avoiding a compiler error is to go to the Build Phase and remove "yournewfile.m" from the Compile Sources.

    0 讨论(0)
提交回复
热议问题