iOS開發(fā)常用的第三方類庫(kù)
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.htm1 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)推薦技術(shù)專區(qū)
|
評(píng)論