iOS Project layering

Source: Internet
Author: User

uploaded by: Riding the wave handsome Category: Other (Others) Views : 408 download number of times: upload time: 2016-01-07 Size: 3 KB The hierarchy in the main project consists of four modules, main (main), Expand (extension), Resource (resources), Vender (third party), and this project has multiple tags to differentiate between different versions, such as local environment Beta, product edition, mainly by tag to distinguish, Different identities correspond to different connection addresses, and of course, other different content can be set;

2.1 Contents of main (Main) module

The main purpose of this module is to store the page content of the project, such as the content of MVC, base (base class) is used for storing some common content, other function module extraction, convenient to inherit the call; In this instance, a common viewcontroller that has been collated in Basecontroller

2.2 Contents of the Expand (extension) module

This module mainly contains const, Macros, Tool, NetWork, Category, database six sub-modules;

2.2.1 Macros (macro) mainly stored in the macro definition of the place, there are two macro files, Macros.h is mainly the project's main macro, such as font, version, color value, etc., and ThirdMacros.h is mainly used to store some third-place SDK key value;

2.2.2 Tool (Tools) mainly store some common classes, here logger for storing the package helper class for the log, reachability is used to store the Help class to determine the state of the network;

2.2.3 Network The main use of this side of the ytknetwork is the ape. iOS research team based on the afnetworking package of iOS network library, this side is to make some modifications, in order to meet the different tags and different functional modules may access different URLs requirements;

2.2.4 Category (category) is mainly used in git above ios-categories classification content, more create another to store the usual to expand the classification;

2.3 Contents of the Resource (Resource) module

The resource module mainly consists of three aspects, global, image (picture), Plist (configuration file);

2.3.1 Global is used to store some of the overall content of the project, including the contents of the startup item Launchscreen.storyboard, the header reference prefixheader.pch, the language pack file.strings

2.3.2 image for the storage of image resources, according to the function module can be divided into different xcassets files;

2.3.3 plist for storing plist files, mainly this project will create a number of tags, and each tag will have its own plist file for management, so unified storage convenient management;

2.4 Contents of the Vender (third-party) module

Although the project has used pod to manage the third-party plug-ins, but for some may have to modify the third party can be stored here, this example refers to a few of the more commonly used third-party plug-ins, a brief introduction of several of them, Gvuserdefaults is the encapsulation of userdefaults, Simple can be used for access operations; Jdstatusbarnotification is the plugin for the effect in the status bar; Actionsheetpicker bottom Popup such as time selection, option plug-in Qbimagepickercontroller is a photo selection plugin that supports multiple selections and can set the maximum number of selected sheets;

Source code has been put (Welcome to perfect together) Github:https://github.com/wujunyang/mobileproject

iOS Project layering

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.