新聞中心

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

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

作者: 時間:2016-10-08 來源:網(wǎng)絡(luò) 收藏
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock usingActivityIndicatorStyle:(UIActivityIndicatorViewStyle)activityStyle;
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock usingActivityIndicatorStyle:(UIActivityIndicatorViewStyle)activityStyle;

UIImage+Resize 調(diào)整圖片大小

本文引用地址:http://2s4d.com/article/201610/305920.htm

GitHub:https://github.com/coryalder/UIImage_Resize

提供多種方法為圖片設(shè)置透明度、圓角、裁剪、調(diào)整大小等:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
- (UIImage *)imageWithAlpha;
- (UIImage *)transparentBorderImage:(NSUInteger)borderSize;
- (UIImage *)roundedCornerImage:(NSInteger)cornerSize borderSize:(NSInteger)borderSize;
- (UIImage *)croppedImage:(CGRect)bounds;
- (UIImage *)thumbnailImage:(NSInteger)thumbnailSize
transparentBorder:(NSUInteger)borderSize
cornerRadius:(NSUInteger)cornerRadius
interpolationQuality:(CGInterpolationQuality)quality;
- (UIImage *)resizedImage:(CGSize)newSize
interpolationQuality:(CGInterpolationQuality)quality;
- (UIImage *)
resizedImageWithContentMode:(UIViewContentMode)contentMode
bounds:(CGSize)bounds
interpolationQuality:(CGInterpolationQuality)quality;

更詳細(xì)使用見:http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/

ImageCacheResize 異步加載圖片、緩存及調(diào)整大小

GitHub:https://github.com/toptierlabs/ImageCacheResize

整合了SDWebImage和UIImage+Resize的功能,用于圖片的異步加載、緩存、以及下載完成后調(diào)整大小并顯示在UIImageView上。

提供了以下API用于加載圖片以及加載完成后調(diào)整圖片大小:

  • <td id="brj3p"><tr id="brj3p"><th id="brj3p"></th></tr></td>


    關(guān)鍵詞:

    評論


    相關(guān)推薦

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