2011-07-19 6 views

答えて

3

スライダーコントロールを使用してサンプルを作成しました。 あなたは、ボタンを押すにこのスライダをアクティブにし、そのUIImageについて、あなたはこの方法でそれを行うことができた場合は、画像 https://github.com/manishnath/Code/tree/master/zommin

2

のためにそれをグーグルしてみましょう - (ボイド) { CGRect frameRect = temp.frameをonButtonClick。 //一時ウルUIMAGEVIEW

frameRect.size.width= your_width; 

frameRect.size.height= height; 

temp.frame=frameRect; 

}

1

あなたがイメージビュー自体のサイズを変更したい場合はImageViewのはcontentMode性質を持っている場合、

CGRect newRect = imageView.frame; 
newRect.size.width = reqWidth; 
newRect.size.height = reqHeight; 
imageView.frame = newRect; 

のような画像もリサイズされますかUIViewContentModeScaleAspectFit

2

の大きさを増減するためにそれを使用することができます。 UIImageViewでは、フレームサイズを変更できます。

- (UIImage *) resizeImage:(UIImage *)image newWidth:(CGFloat)width 
       newHeight: (CGFloat)height 
{ 
    CGRect area = CGRectMake(0, 0, width,height); 
    CGSize size = area.size; 

    UIGraphicsBeginImageContext(size); 
    [image drawInRect:area];  
    UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); 
    UIGraphicsEndImageContext(); 

    return newImage;  
} 
関連する問題