You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.2 KiB
48 lines
1.2 KiB
// |
|
// TFShareBodyModel.m |
|
// TFReader |
|
// |
|
// Created by 谢腾飞 on 2020/12/5. |
|
// Copyright © 2020 xtfei_2011@126.com. All rights reserved. |
|
// |
|
|
|
#import "TFShareBodyModel.h" |
|
|
|
@implementation TFShareBodyModel |
|
|
|
- (void)setShareUrl:(NSString *)shareUrl |
|
{ |
|
_shareUrl = shareUrl; |
|
|
|
if (!kObjectIsEmpty(shareUrl)) { |
|
[[YYWebImageManager sharedManager] requestImageWithURL:[NSURL URLWithString:shareUrl] options:kNilOptions progress:nil transform:nil completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) { |
|
self.shareImage = image; |
|
}]; |
|
} |
|
} |
|
|
|
- (UIImage *)shareImage |
|
{ |
|
if (!_shareImage) { |
|
_shareImage = [UIImage imageNamed:[[[[NSBundle mainBundle] infoDictionary] valueForKeyPath:@"CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles"] lastObject]]; |
|
} |
|
return _shareImage; |
|
} |
|
|
|
- (NSString *)title |
|
{ |
|
if (!_title) { |
|
_title = App_Name; |
|
} |
|
return _title; |
|
} |
|
|
|
- (NSString *)desc |
|
{ |
|
if (!_desc) { |
|
_desc = [NSString stringWithFormat:@"%@ - %@%@", App_Name, TFLocalizedString(@"分享得"), TFSystemInfoManager.masterUnit]; |
|
} |
|
return _desc; |
|
} |
|
|
|
@end
|
|
|