2012-06-23 37 views

回答

1

按照UIImageView Class Reference,下initWithImage:

這種方法調整接收機的幀以匹配指定的圖像的大小。它也默認禁用圖像視圖的用戶交互。

如果圖像是在UIImage對象,調用initWithImage:應該創建一個UIImageView與您的圖片適當大小的框架。

// Get your UIImage from somewhere 
UIImage *myImage = ... 

UIImageView *imageView = [[UIImageView alloc] initWithImage:myImage]; 
相關問題