2014-11-28 2 views

ответ

0

Наконец получил ответ

UIImageView temp =myimageview; 
       RectangleF rect = new RectangleF (temp.Frame.X, temp.Frame.Y, temp.Frame.Width, temp.Frame.Height); 
       temp.Image = UIImage.FromFile("images/imagename.png"); 
       temp.Layer.CornerRadius = temp.Frame.Width/2; 
       temp.ClipsToBounds = true; 
       temp.ResizableSnapshotView (rect, true, new UIEdgeInsets (0, 50,0, 0)); 
1

добавить это в

UIImage *image = [UIImage imageNamed:@"yourimage.jpg"]; 

    UIGraphicsBeginImageContextWithOptions(imageView.bounds.size, NO, 1.0); 
    [[UIBezierPath bezierPathWithRoundedRect:imageView.bounds 
           cornerRadius:10.0] addClip]; 
    [image drawInRect:imageView.bounds]; 
    imageView.image = UIGraphicsGetImageFromCurrentImageContext(); 
    UIGraphicsEndImageContext(); 
+0

Привет Sport. Спасибо за ваше решение. Но мне нужно решение, связанное с одним касанием. Этот код, конвертирующий в mono touch, не работает для меня –

Смежные вопросы