#import "UIImageView+More.h"
@implementation UIImageView (More)
/**
实例化 Frame + 图片名
*/
+ (UIImageView *)ImageViewWithFrame:(CGRect)rect image:(UIImage *)image
{
UIImageView *imageView = [[UIImageView alloc] initWithFrame:rect];
imageView.image = image;
return imageView;
}
/**
标准实例化 + 用户交互
*/
+ (UIImageView *)ImageViewWithFrame:(CGRect)rect image:(UIImage *)image userInteraction:(BOOL)is
{
UIImageView *imageView = [[UIImageView alloc] initWithFrame:rect];
imageView.image = image;
imageView.userInteractionEnabled = is;
return imageView;
}
@end
|
|