NIMAvatarImageView.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // NIMAvatarImageView.h
  3. // NIMKit
  4. //
  5. // Created by chris on 15/2/10.
  6. // Copyright (c) 2015年 Netease. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import <NIMSDK/NIMSDK.h>
  10. #import "NIMKitDependency.h"
  11. @interface NIMAvatarImageView : UIControl
  12. @property (nonatomic,strong) UIImage *image;
  13. @property (nonatomic,assign) CGFloat cornerRadius;
  14. - (void)setAvatarBySession:(NIMSession *)session;
  15. - (void)setAvatarByMessage:(NIMMessage *)message;
  16. @end
  17. @interface NIMAvatarImageView (SDWebImageCache)
  18. - (NSURL *)nim_imageURL;
  19. - (void)nim_setImageWithURL:(NSURL *)url;
  20. - (void)nim_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder;
  21. - (void)nim_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options;
  22. - (void)nim_setImageWithURL:(NSURL *)url completed:(SDExternalCompletionBlock)completedBlock;
  23. - (void)nim_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDExternalCompletionBlock)completedBlock;
  24. - (void)nim_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDExternalCompletionBlock)completedBlock;
  25. - (void)nim_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDExternalCompletionBlock)completedBlock;
  26. - (void)nim_setImageWithPreviousCachedImageWithURL:(NSURL *)url andPlaceholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDExternalCompletionBlock)completedBlock;
  27. - (void)nim_cancelCurrentImageLoad;
  28. - (void)nim_cancelCurrentAnimationImagesLoad;
  29. @end