用来获取Assets.xcassets文件中的资源,资源必须是一下方法存储的才可以获取
![](https://img.haomeiwen.com/i2123985/3d0f0bceebbd4158.png)
![](https://img.haomeiwen.com/i2123985/b8814bec5f9bc51a.png)
![](https://img.haomeiwen.com/i2123985/5a0edd549c239d89.png)
初始化方法
- (instancetype)init
- (nullableinstancetype)initWithName:(NSString *)name;
- (nullableinstancetype)initWithName:(NSString *)name bundle:(NSBundle *)bundle
属性
@property (nonatomic, readonly, copy) NSString *name;
@property (nonatomic, readonly, copy) NSData *data;
@property(nonatomic,readonly,copy) NSString *typeIdentifier;
name参数就是文件qqData的名字。
网友评论