/ Published in: Other
Expand |
Embed | Plain Text
viewImage.image = nil;//既に画像の読み込まれたUIImageView NSString *imageName = [NSString stringWithFormat: @"img2"];//新しくのせかえるUIImage NSString *imagePath = [[NSBundle mainBundle] pathForResource:imageName ofType:@"png"]; img = [[UIImage alloc] initWithContentsOfFile:imagePath]; viewImage.image = img; viewImage.contentMode = UIViewContentModeScaleAspectFill; [img release];
You need to login to post a comment.
