iOS架构之路08 -- .framework静态库依赖(第三方

2021-09-16  本文已影响0人  YanZi_33
image.png
#import "SFViewController.h"
#import "UIImageView+WebCache.h"

@interface SFViewController ()

@property(nonatomic,strong)UIImageView *im;

@end

@implementation SFViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    NSBundle *bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"MyCategoryBundle" ofType:@"bundle"]];
    NSString *path = [[bundle resourcePath] stringByAppendingPathComponent:@"sf_navBack_hl"];
    
    self.im = [[UIImageView alloc]initWithFrame:CGRectMake(100, 100, 100, 100)];
    self.im.image = [UIImage imageWithContentsOfFile:path];
    [self.view addSubview:self.im];
    
    NSString *urlString = @"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fn.sinaimg.cn%2Fsinacn%2Fw640h736%2F20180129%2F1c2d-fyqzcxh8593608.jpg&refer=http%3A%2F%2Fn.sinaimg.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1634115541&t=a21cc2b149a3633837aba436cc62fe38";
    [self.im sd_setImageWithURL:[NSURL URLWithString:urlString]];
}

@end
image.png image.png image.png
上一篇下一篇

猜你喜欢

热点阅读