Directory structure during iOS project development (RPM)

Source: Internet
Author: User

Directory structure during iOS project development

In this directory structure I really eat a lot of pain, began to feel fast write fast, and later found that only fast is not, in the structure of the whole project has a clear understanding and understanding of the hastily before the pen (knocking code) is very bold,

Fortunately, in the process of subsequent changes to slowly figure out a set of directory structure, now sent out to you for reference.

Project Home directory Structure:

1.Network is used primarily for network requests and for processing of data after a request is completed.


2.Category: Category, this folder put here I think is not very accurate, but exactly where to put it I have been unable to really come down


3.Controller: Controller, put the module of the project inside, each module should be a folder


4.MACRO: Macro definitions required in the application, such as notification when the controller updates the UI when the request is complete, some constants, and header files summarizing some common classes,

HeadFIle.h contains the frequently used header files, and then #import "HeadFile.h" in the. pch file

5.Model: The Applied data model


6.Resource: The main storage of application needs pictures

7. Practical gadgets, such as converting hexadecimal color values to uicolor directly used classes, sometimes the UI gives us a #f0f0f0 color instead of (240,240,240) such a color value, we can directly convert the #f0f0f0 to color

8. Required third-party libraries: such as ASIHTTPRequest,


after getting the project requirements, it is recommended that you take a moment to think about what kind of directory structure you need. Carefully divided later in the later maintenance and add new features will have a multiplier effect, do not directly to the controller inside write requests, write UI, write data processing, This may seem a bit faster, but as the project becomes more complex, it will only suffer later and the code will become more and more difficult to maintain. So we must do a good job in the early stage, thinking is necessary (blood dripping lessons AH).


Additional recommendations to you several Xcode plugins:

1. Code comment Tool Plug-in

Https://github.com/onevcat/VVDocumenter-Xcode


2. Partial code Auto-complete plug-in
Https://github.com/chendo/FuzzyAutocompletePlugin

is actually some code snippet, we can also add their own common small fragments, such as


You can try to enter <# "Viewcontroller" #> in the edit box, and then call to see the effect (two # do not enter at the same time OH)



3.package Package Manager, provides a plugin supported by Xcode,
Https://github.com/supermarin/alcatraz-packages
Installation method: http://alcatraz.io/



Well, first sum up so much, what new things I will continue to update

Self-assessment: Look at the project catalogue layout ...


Directory structure during iOS project development (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.