您的位置:首页 > 运维架构 > 网站架构

从0开始架构一个IOS程序——03 — -分包用添加pch全局引用文件

2017-08-26 17:23 549 查看

从0开始架构一个IOS程序 03分包用添加pch全局引用文件

Mac OSX 10.11 之后

PCH文件简介:

PCH文件是Xcode编程中全局引用共享的文件。可以在这里引入头文件或者宏定义来方便程序中多个文件访问。

PCH文件创建:

打开工程 New File… -> iOS Other -> PCH File 输入PCH文件名字即可。

1 PCH文件配置:



2 PCH文件常用:

//
//  common.pch
//  base_test
//
//  Created by  androidlongs on 17/8/7.
//  Copyright © 2017年  androidlongs. All rights reserved.
//

#ifndef common_pch
#define common_pch

// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.

#import "AFNetworking.h"
#import "Masonry.h"
#import "YYKit.h"
//SDWebImage
#import "UIImageView+WebCache.h"

#endif /* common_pch */


3 创建文件时,自定义文件名前缀设置:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ios开发 ios架构