开发者

Best way to sort viewcontrollers/xibs?

开发者 https://www.devze.com 2023-04-06 21:32 出处:网络
On the left side in Xcode, how should I organize many different view controllers? Put each view controller\'s .h and .m and .xib in one folder? Put all the .h\'s in one folder, .m\'s in another, and .

On the left side in Xcode, how should I organize many different view controllers? Put each view controller's .h and .m and .xib in one folder? Put all the .h's in one folder, .m's in another, and .xib's in another? What's the best way to deal with lots of view controller开发者_如何学Cs if you have 5? 10? 20?


I use this sort of structuring and all apple example have mentioned the same. Put each view controller's .h and .m and .xib in one folder.


You can go this way: 1. Make a folder(suppose viewController) for Only view controllers and put all the .h and .m files together.You can also make subfolders(or category folders ) in viewcontroller.

  1. put all the views(.Xibs) in one folder suppose folder name XIB here also you can categorize your subfolder depending upon your xibs.
  2. I personally don't think it's better to put .h in one and ., in other folder,rather keep them together.It help you locating them easily.
  3. You can also make seperate folder for resources and in this ResourceFolder make subfolder's like images,audio,video etc.
  4. You can also make seperate folder as:DataStorage folder for putting your xml,.db,.plist or simple text files.
  5. Make seperate folder for your NSOnject subclasses if you you are using them.

hope this help you in organizing your project resources.

0

精彩评论

暂无评论...
验证码 换一张
取 消