[英]How do I resize a picture using UIImageView so that I can zoom in and out?
[英]How do I set the picture in a 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"];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.