iOS 控件详解

iOS NSBundle

2018-10-25  本文已影响0人  风冰武
//用于创建或检索包实例的方法     (32行)
@property (class, readonly, strong) NSBundle *mainBundle;


//返回指定名称和文件扩展名标识的资源的完整路径名(如:plist);   92行
//参数1: 资源文件的名称
//参数2: 文件扩展名
//返回: 资源文件的完整路径名;
- (nullable NSString *)pathForResource:(nullable NSString *)name ofType:(nullable NSString *)ext;

1: 父类

继承于: NSObject

2: 属性



//获取Resource文件夹中的资源的bundle子目录的完整路径名
@property (nullable, readonly, copy) NSString *resourcePath;

3: 方法

//描述:返回与指定目录相对应的NSBundle对象。
//参数1: 目录的路径
//返回: 与路径相对应的NSBundle对象
+ (nullable instancetype)bundleWithPath:(NSString *)path;




上一篇 下一篇

猜你喜欢

热点阅读