FWImageClassWrapper
@interface FWImageClassWrapper : FWClassWrapper
Undocumented
-
创建主题模拟动态图像,分别指定浅色和深色,不支持动态切换,需重新赋值才会变化
Declaration
Objective-C
- (nonnull UIImage *)themeLight:(nullable UIImage *)light dark:(nullable UIImage *)dark;
-
创建主题模拟动态图像,指定提供句柄,不支持动态切换,需重新赋值才会变化
Declaration
Objective-C
- (nonnull UIImage *)themeImage: (nonnull UIImage *_Nullable (^)(FWThemeStyle))provider;
-
创建主题模拟动态图像,指定名称,兼容系统方式(仅iOS13+支持动态图像)和手工指定,支持动态切换,需配置any和dark
Declaration
Objective-C
- (nonnull UIImage *)themeNamed:(nonnull NSString *)name;
-
创建主题模拟动态图像,指定名称和bundle,兼容系统方式(仅iOS13+支持动态图像)和手工指定,支持动态切换,需配置any和dark
Declaration
Objective-C
- (nonnull UIImage *)themeNamed:(nonnull NSString *)name bundle:(nullable NSBundle *)bundle;
-
手工单个注册主题图像,未配置主题图像时可使用本方式
Declaration
Objective-C
- (void)setThemeImage:(nullable UIImage *)image forName:(nonnull NSString *)name;
-
手工批量注册主题图像,未配置主题图像时可使用本方式
Declaration
Objective-C
- (void)setThemeImages: (nonnull NSDictionary<NSString *, UIImage *> *)nameImages;
-
默认主题图片颜色,未设置时为浅色=>黑色,深色=>白色
Declaration
Objective-C
@property (nonatomic, strong) UIColor *_Nonnull themeImageColor;
-
从视图创建UIImage,生成截图,主线程调用
Declaration
Objective-C
- (nullable UIImage *)imageWithView:(nonnull UIView *)view;
-
从颜色创建UIImage,默认尺寸1x1
Declaration
Objective-C
- (nullable UIImage *)imageWithColor:(nonnull UIColor *)color;
-
从颜色创建UIImage,指定尺寸
Declaration
Objective-C
- (nullable UIImage *)imageWithColor:(nonnull UIColor *)color size:(CGSize)size;
-
从颜色创建UIImage,指定尺寸和圆角
Declaration
Objective-C
- (nullable UIImage *)imageWithColor:(nonnull UIColor *)color size:(CGSize)size cornerRadius:(CGFloat)radius;
-
从block创建UIImage,指定尺寸
Declaration
Objective-C
- (nullable UIImage *)imageWithSize:(CGSize)size block:(nonnull void (^)(CGContextRef _Nonnull)) block;