新聞中心

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

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

作者: 時間:2016-10-08 來源:網(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一樣簡單,如以下官方例子:

本文引用地址: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提供下拉刷新功能的類庫,使用起來稍顯麻煩,需要實現(xiàn)諸多協(xié)議(代碼取自官方DEMO):

    <pre id="yooyn"></pre>

      1

      關(guān)鍵詞:

      評論


      相關(guān)推薦

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