iOS方法封装
(void) setSubView:(UIView *)masterView subCCGRect:(CGRect)subCCGRect
imageName:(NSString *)imageName
indexVaule :(NSInteger) indexVaule {
UIImageView *imageView = [[UIImageView alloc] initWithFrame:subCCGRect];
imageView.image = [UIImage imageNamed:[NSString stringWithFormat:imageName,indexVaule+1]];
[masterView addSubview:imageView];
}
图片绑定的用的地方不少,先封装一个 试试。