You could not set the corner of UIImage instance because it's not inherited from UIView So you need to create an UIImageView instance by passing your UIImage use the below code UIImageView * roundedView = UIImageView alloc initWithImage: UIImage imageNamed:@"wood. Jpg"; // Get the Layer of any view CALayer * l = roundedView layer; l setMasksToBounds:YES; l setCornerRadius:10.0.
You could not set the corner of UIImage instance because it's not inherited from UIView, So you need to create an UIImageView instance by passing your UIImage. Use the below code. UIImageView * roundedView = UIImageView alloc initWithImage: UIImage imageNamed:@"wood.
Jpg"; // Get the Layer of any view CALayer * l = roundedView layer; l setMasksToBounds:YES; l setCornerRadius:10.0.
I need set image to buttons so how to set round corners to image – user674490 Apr 22 at 6:11 @ user674490: Then set the corner of your UIButton not image. Then use CALayer * l = myButton layer; l setMasksToBounds:YES; l setCornerRadius:10.0; – Jhaliya Apr 22 at 6:14.
Use below code. CALayer * l = camBtn layer; l setMasksToBounds:YES; l setCornerRadius:10.0.
Get the layer of camBtn. Setimage to that layer. Add cornerradious to that layer.
The camBtn should be custombutton //layer work UIImageView * roundedView = UIImageView alloc initWithImage: UIImage imageNamed:@"wood. Jpg"; // Get the Layer of any view CALayer * l = roundedView layer; l setMasksToBounds:YES; l setCornerRadius:10.0; Regards, shyam.
YourImageView.layer. CornerRadius = 5.0; //change value for your need.
Set the proper radius value for this: UIImageView -> layer -> cornerRadius Be sure to include QuartzCore. H UIImageView* imgView = UIImageView alloc initWithImage:image; imgView.layer. CornerRadius = 15.0; Where image is the image you wish to show.
Display the above imageView to get the rounded effect.
I can't understand tell me clearly – user674490 Apr 22 at 6:32 edited the post. See it. – Bourne Apr 22 at 6:35 iam set the image to button so I need image should be rounded corners not a UI ImageView – user674490 Apr 22 at 6:47 Then make a UIButton of UIButtonTypeCustom and set the above as the background image using the setBackgroundImage message – Bourne Apr 22 at 7:01.
UIImageView *pic = UIImageView alloc initWithImage: ...; pic.layer. CornerRadius = 7.0f; pic.layer. MasksToBounds = YES.
How to set round corners in UI images in iphone - Stack Overflow.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.