0
我需要設置圖像視圖以在此顯示圖像。如何在UIImageView中設置圖片
else if (n == 2) {
gamestatus.text = @"The Card is A Two.";
// I Need to set my imageview to a picture here.
}
我需要設置圖像視圖以在此顯示圖像。如何在UIImageView中設置圖片
else if (n == 2) {
gamestatus.text = @"The Card is A Two.";
// I Need to set my imageview to a picture here.
}
UIImageView *imageView = [[UIImageView alloc] initWithImage:myImageHere];
,或者如果ImageView的已聲明...
myImageView.image = myImageHere;
編輯:回答有關如何設置到圖像的問題。
一種簡單的方式(有些人會認爲它的效率會低一點),
myImageView.image = [UIImage imageNamed:@"my Example Image.png"];