こんにちは、画像ファイルを作成したカスタム uitableview セルにすることができません。画像が小さすぎて拡大の仕方がわかりません。事前に助けてください。
#import <UIKit/UIKit.h>
@interface customCell : UITableViewCell
{
//UILabel *frontLabel;
}
@property(nonatomic , strong) IBOutlet UILabel *label;
@property(nonatomic , strong) IBOutlet UILabel *label2;
@property(nonatomic , strong) IBOutlet UIImageView *imgView;
@end
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"cell";
customCell * cell =[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[customCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
// cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
User * user = [self.list objectAtIndex: indexPath.row];
cell.label.text = user.username;
NSString *url = user.profilePic;
UIImage * image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:url]]];
cell.imageView.contentMode =UIViewContentModeScaleAspectFit;
cell.imageView.image =image;
return cell;
}