Directory structure in iOS project development

Source: Internet
Author: User

directory structure:1.AppDelegate

This directory is a AppDelegate.h (. m) file, which is the entry file for the entire application, so take it out separately.

2.Models This directory has a number of data-related model files in it, presumably: Models

|-BaseModel.h

|-BASEMODEL.M

|-CollectionModel.h

|-COLLECTIONMODEL.M

3.Macro

This directory gives the macro definition used by the entire application, presumably:

Macro

|-AppMacro.h

|-NotificationMacro.h

|-VendorMacro.h

|-UtilsMacro.h

...

AppMacro.h app-related macro definitions, such as:

Expression-related

#define Emotion_cache_path @ "Cachedemotions"

#define Emotion_recent_used @ "Recentusedemotions"

#define Emotion_categories @ "Categoryemotions"

#define Emotion_topics @ "Emotiontopics"

Collection related

#define Collect_cache_path @ "collected"

Mapping related

#define WATERFALL_ITEM_HEIGHT_MAX 300

#define WATERFALL_ITEM_WIDTH 146

The NotificationMacro.h is a notification-related macro definition.

 

In UtilsMacro.h, there are some handy macro definitions, such as:

#define UICOLORFROMRGB (r,g,b) [Uicolor \

colorwithred:r/255.0 \

green:g/255.0 \

blue:b/255.0 Alpha:1]

#define NSSTRINGFROMINT (intvalue) [NSString stringwithformat:@ "%d", Intvalue]

VendorMacro.h Some third-party constants, such as:

#define Umeng_key @ "xxxxx"

#define UMENG_CHANNEL_ID @ "XXX"

If you have a new type of macro definition, you can create a new related Macro.h.

4.General

This directory will be reused by views/classes and categories. It's probably like this:

General |

|-Tpkscollview

|-Tpkpulltorefresh

...    | -Classes

|-Tpkbaseviewcontroller

|-Tpkhorizontalview

...

| -Categories

|-Uiviewcontroller+sizzle

|-Uiimageview+downloader

...

The TPK here is the acronym for the project.

5.Helpers

This directory puts in some helper classes, with filenames linked to functionality. It's probably like this:

Helpers

|-Tpksharehelper

|-Tpdbhelper

|-Tpkemotionhelper

...

The main role of helper classes is to help controllers to slim down, but also to provide some degree of reuse.

6.Vendors

This directory puts third-party class libraries/sdk, such as Umeng, WEIBOSDK, WEIXINSDK, and so on.

7.Sections

The following files in this directory correspond to the specific elements of the app, such as navigation, waterfall flow, and so on. It's probably like this:

Sections |-Menu |-Setting

|-Collection

... 8.Resources

This directory is a list of resources that the app will use, mostly pictures.

Directory structure in iOS project development

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.