新聞中心

EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > iOS開發(fā)常用的第三方類庫(kù)

iOS開發(fā)常用的第三方類庫(kù)

作者: 時(shí)間:2016-10-08 來(lái)源:網(wǎng)絡(luò) 收藏
1
2
3
4
5
6
- (void)setImageWithURL:(NSURL *)url andCropToBounds:(CGRect)bounds;
- (void)setImageWithURL:(NSURL *)url andResize:(CGSize)size withContentMode:(UIViewContentMode)mode;
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder andCropToBounds:(CGRect)bounds;
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options andResize:(CGSize)size;
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options andResize:(CGSize)size withContentMode:(UIViewContentMode)mode;
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options andCropToBounds:(CGRect)bounds;

使用方法和SDWebImage一樣簡(jiǎn)單,如以下官方例子:

本文引用地址:http://2s4d.com/article/201610/305920.htm
1
2
[imageview setImageWithURL:[NSURL URLWithString:@http://t0.gstatic.com/images?q=tbn:ANd9GcQfraHpiabjEY8iDdBe9OUQYHMtwfuAv9ZRR0RYKuoVF_EpE8Fp5A] andResize:CGSizeMake(30, 30) withContentMode:UIViewContentModeScaleAspectFit]; // 按比例縮放
[imageview setImageWithURL:[NSURL URLWithString:@http://t0.gstatic.com/images?q=tbn:ANd9GcQfraHpiabjEY8iDdBe9OUQYHMtwfuAv9ZRR0RYKuoVF_EpE8Fp5A] andCropToBounds:CGRectMake(0, 0, 100, 100)]; // 裁剪成100x100大小

EGOTableViewPullRefresh 下拉刷新

GitHub:https://github.com/enormego/EGOTableViewPullRefresh

這是最早出現(xiàn)的為UITableView提供下拉刷新功能的類庫(kù),使用起來(lái)稍顯麻煩,需要實(shí)現(xiàn)諸多協(xié)議(代碼取自官方DEMO):

1

關(guān)鍵詞:

評(píng)論


相關(guān)推薦

技術(shù)專區(qū)

<source id="9hj3j"><tr id="9hj3j"></tr></source>